#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
using i128 = __int128;
#define endl '\n'
#define cty cout<<"Yes"<<endl
#define ctn cout<<"No"<<endl
#define dbg(x) cout<<#x<<" : "<<x<<endl
#define int long long
const int mxn = 2e5+10;
const int mod = 998244353;
double ST,ED;
int n,l,r;
int a[mxn];
int dp[mxn];
void LonelyLunar_solve(){
cin>>n>>l>>r;
for(int i = 0;i <= n; i++){
cin>>a[i];
}
for(int i = l;i <= n; i++){
int tmp = 0;
for(int j = max(0ll,i-r);j <= i-l; j++){
tmp = max(tmp,dp[j]);
}
dp[i] = max(dp[i],tmp+a[i]);
}
int res = -1e18;
for(int i = n-r;i <= n; i++) res = max(res,dp[i]);
cout<<res<<endl;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int _ = 1;
while(_--){
LonelyLunar_solve();
}
return 0;
}