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

// 1 <= n <= 100
#define _minn 1
#define _maxn 100 
// 1 <= L <= 100000
#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 0x7F7F7F7F
#define maxn 101 
#define maxl 20000

#define max(a,b) ((a)>(b)?(a):(b))

int n, l, L;
int minR, maxR;
int a[maxl], sa[maxl], la[maxl];
unsigned int ans[maxl][maxn];
int gans;
char si[2];
char so[4];

int main(void)
{
   int i, j, k;   
   
   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, 0x7F, sizeof(ans));

   for( i = l-1 + minR; 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++ )
      {
         for( k = minR; k <= maxR; k++ )
         {
            if( i - l - k < 0 ) break;
            if( ans[i][j] > ans[i-l-k][j-1] +la[i]) 
               ans[i][j] = ans[i-l-k][j-1] + la[i];            
         }
         
      }

   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;
}