Problem: There are N panels arranged in a row in Takahashi's house, numbered 1 through N. The i-th panel has a number A_i written on it. Takahashi is playing by throwing balls at these panels.

Takahashi threw a ball K times. Let the panel hit by a boll in the i-th throw be panel p_i. He set the score for the i-th throw as i \times A_{p_i}.

He was about to calculate the total score for his throws, when he realized that he forgot the panels hit by balls, p_1,p_2,...,p_K. The only fact he remembers is that for every i (1 ≦ i ≦ K-1), 1 ≦ p_{i+1}-p_i ≦ M holds. Based on this fact, find the maximum possible total score for his throws.

Constraints

* 1 ≦ M ≦ N ≦ 100,000
* 1 ≦ K ≦ min(300,N)
* 1 ≦ A_i ≦ 10^{9}

Input

The input is given from Standard Input in the following format:


N M K
A_1 A_2 … A_N


Output

Print the maximum possible total score for Takahashi's throws.

Examples

Input

5 2 3
10 2 8 10 2


Output

56


Input

5 5 2
5 2 10 5 9


Output

28


Input

10 3 5
3 7 2 6 9 4 8 5 1 1000000000


Output

5000000078

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#include <assert.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
#define MOD 1000000007LL
#define endl "\n"
const ll UNDEF = -1;
const ll INF=1e18;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, true : false; }
template<typename T> inline bool chkmin(T &aa, T bb) { return aa > bb ? aa = bb, true : false; }
typedef pair<ll,ll> pll;

#ifdef DEBUG
     #define debug(args...)            {dbg,args; cerr<<endl;}
#else
    #define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger
{
    template<typename T> debugger& operator , (const T& v)
    {    
        cerr<<v<<" ";    
        return *this;    
    }
} dbg;
const ll mn=1e5+4;
ll dp[mn];
const ll MAXLOG=18;
#define LOG2(X) ((unsigned) (8*sizeof (unsigned long long) - __builtin_clzll((X)) - 1))
ll table[MAXLOG][mn];
void preprocess_rmq(ll *array, ll n) {
	for(ll i=0;i<n;i++)            
   table[ 0 ][ i ]=array[ i ];         //building base
  for(ll j=1;j<=LOG2(n);j++)
   for(ll i=0;i+(1LL<<(j-1))<n;i++) {
     table[ j ][ i ] = max ( table[ j-1 ][ i ], table[ j-1 ][ i+(1LL<<(j-1)) ] );  //use previously computed
     //printf("j:%lld i:%lld t:%lld i+(1LL<<(j-1)):%lld\n",j,i,table[j][i],i+(1LL<<(j-1)));
   }
}
ll query_rmq(ll x, ll y) {
  ll len=y-x+1;
  ll k=LOG2(len);
  //printf("Query. k:%lld x:%lld y:%lld y+1-(1LL<<k):%lld\n",k,x,y,y+1-(1LL<<k));
  return max(table[ k ][ x ],table[ k ][ y+1-(1LL<<k) ]);   // ranges may overlap
}
ll a[mn];
int main()
{
	ios_base::sync_with_stdio(false); cin.tie(0);
	ll n,m,klim; scanf("%lld%lld%lld",&n,&m,&klim);
	for (ll i=1;i<=n;i++) scanf("%lld",a+i);
	//	for (ll j=1;j<=n;j++) printf("%lld ",a[j]);
	//		printf("end a\n");
	ll jlim;
	{
		ll j=0;
		while((1<<j)<m) j++;
		jlim=j-1;
	}
	memset(dp,0,sizeof dp);
	preprocess_rmq(dp,n+1);
	ll cur=1,prev=0;
	ll final=0;
	for (ll k=1;k<=klim;k++) {
		fill(dp,dp+n+1,-INF);
		for (ll x=1;x<=n;x++) {
			ll best=query_rmq(max(0ll,x-m),x-1);
			//printf("%lld %lld: %lld\n",max(0ll,x-m),x-1,best);
			if (best==-INF) continue;
			chkmax(dp[x],best+k*a[x]);
			chkmax(final,dp[x]);
		}
		//for (ll x=0;x<=n;x++) printf("%lld ",dp[x]);
		//printf("\n");
		preprocess_rmq(dp,n+1);
		swap(cur,prev);
	}
	printf("%lld\n",final);
}