#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=100010;
int n,s,t;
int sum[N];
deque<int> q;
int maxx=LONG_LONG_MIN;
signed main()
{
freopen("ggame.in","r",stdin);
freopen("ggame.out","w",stdout);
scanf("%lld%lld%lld",&n,&s,&t);
for(int i=1;i<=n;i++)
{
scanf("%lld",&sum[i]);
sum[i]+=sum[i-1];
}
for(int i=s;i<=n;i++)
{
while(!q.empty()&&i-q.front()>t) q.pop_front();
while(!q.empty()&&sum[q.back()]>=sum[i-s]) q.pop_back();
q.push_back(i-s);
maxx=max(maxx,sum[i]-sum[q.front()]);
}
printf("%lld",maxx);
return 0;
}