#include <stdio.h>
#include <string.h>
#include <assert.h>

// 1 <= n <= 100
#define _minn 1
#define _maxn 100 
// 1 <= L <= 20 000
#define _minL 1
#define _maxL 20000
#define _minl 1
#define _maxl 100
// 1 <= a[i] <= 10000, сумма влазит в integer
#define _mina 1
#define _maxa 10000 
// 0 <= minR <= maxR <= 1000
#define _minminR 0
#define _maxminR 1000  
#define _minmaxR 0
#define _maxmaxR 1000

// нас интересует ответ для N => maxn = n + 1
#define inf 0x3F3F3F3F
#define maxn 101 
#define maxl 20000
#define maxr 1002

int n, l, L;
int minR, maxR, T;
int a[maxl], sa[maxl], la[maxl];
unsigned int ans[maxl][maxn];
int heap[maxn][maxr], inh[maxn], addres[maxn][maxr], paddres[maxn][maxr], pointer[maxn];
int gans;

void swaph(int hn, int ad1, int ad2)
{
   int t;
   t = heap[hn][ad1]; heap[hn][ad1] = heap[hn][ad2]; heap[hn][ad2] = t;
   t = paddres[hn][ad1]; paddres[hn][ad1] = paddres[hn][ad2]; paddres[hn][ad2] = t;
   t = addres[hn][paddres[hn][ad1]]; addres[hn][paddres[hn][ad1]] = addres[hn][paddres[hn][ad2]]; addres[hn][paddres[hn][ad2]] = t;
}

void shift_up(int hn, int num)
{
   while( num > 1 && heap[hn][num] < heap[hn][num>>1] )
   {
      swaph(hn, num, num>>1);
      num >>= 1;
   }
}

void shift_down(int hn, int num)
{
   int t, smallest;
   while( 1 )
   {
      smallest = num;
      t = num<<1;
      if( t <= inh[hn] && heap[hn][t] < heap[hn][smallest] ) smallest = t;
      t |= 1;
      if( t <= inh[hn] && heap[hn][t] < heap[hn][smallest] ) smallest = t;
      if( smallest == num ) break;
      swaph(hn, smallest, num);
      num = smallest;
   }
}

void removefrom(int hn)
{
   int t = addres[hn][pointer[hn]];
   swaph(hn, addres[hn][pointer[hn]], inh[hn]);
   inh[hn]--;
   shift_down(hn, t);
   shift_up(hn, t);
}

void addto(int hn, int val)
{
   inh[hn]++;
   heap[hn][inh[hn]] = val;
   addres[hn][pointer[hn]] = inh[hn];
   paddres[hn][inh[hn]] = pointer[hn]; 
   pointer[hn] = (pointer[hn] + 1) % T;
   shift_up(hn, inh[hn]);
}

int main(void)
{
   int i, j;

   freopen("stations.in", "r", stdin);
   freopen("stations.out", "w", stdout);
   
   scanf("%d%d%d", &n, &l, &L);
   scanf("%d%d", &minR, &maxR);
   assert( _minn <= n && n <= _maxn );
   assert( _minl <= l && l <= _maxl );
   assert( _minL <= L && L <= _maxL ); 
   assert( _minminR <= minR && minR <= _maxminR );
   assert( _minmaxR <= maxR && maxR <= _maxmaxR );

   for( i = 0; i < L; i++ )
   {
      scanf("%d", &a[i]);
      assert( _mina <= a[i] && a[i] <= _maxa );
   }

   sa[0] = a[0];
   for( i = 1; i < L; i++ )
      sa[i] = sa[i-1] + a[i];

   la[l-1] = sa[l-1];
   for( i = l; i < L; i++ )
      la[i] = sa[i] - sa[i-l];

   memset(ans, 0x3F, sizeof(ans));

   T = maxR - minR + 1;

   for( i = minR + l-1; i <= maxR + l-1; i++ )
      if( i >= 0 && i < L )
         ans[i][1] = la[i];
   
   for( i = l-1; i < L; i++ )
      for( j = 2; j <= n; j++ )
      {
         if( i - l - minR < 0 ) continue;
         if( i - l - maxR > 0 )        
            removefrom(j);
         addto(j, ans[i-l-minR][j-1]);
         if( inh[j] > 0 )
            ans[i][j] = la[i] + heap[j][1];
      }

   gans = inf;
   for( i = L - maxR-1; i < L - minR; i++ )
      if( i >= 0 && gans > ans[i][n] )     
         gans = ans[i][n];

   if( gans == inf )
      printf("No solution.");
   else
      printf("%d", gans);
   return 0;
}