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
#include <iostream>
#include <deque>

#define MAX_N 100010
#define ll long long
using namespace std;
//dp[i][j] i+1個取って、最後がa[j-m]
ll n,k,m,dp[310][2*MAX_N], a[MAX_N],b[2*MAX_N],deq[2*MAX_N];

void solve(int j){
	int s = 0, t = 0;
	for(int i = 0;i<m+n;i++){
		while(s<t && dp[j-1][deq[t-1]]<dp[j-1][i]){
			t--;
		}
		deq[t++]= i;
		if(i-m+1>=0){
			b[i-m+1] = dp[j-1][deq[s]];//先頭を取り出すのでb[i]が最小値(i>=0 && i<=n-m) b=min(i<=x<=i+m-1)a[x]
			if(deq[s]==i-m+1){
				s++;
			}
		}
	}
}

int main(){
	ll i,j;
	cin >> n >> m >> k;
	for(i=0;i<n;i++){
		cin >> a[i];
	}
	
	for(i=0;i<=m+n;i++){
		for(j=0;j<k;j++){
			dp[j][i] = 0;
		}
	}
	
	for(i=0;i<n;i++){
		dp[0][m+i] = a[i];
	}
	
	for(j=1;j<=k;j++){
		solve(j);
		for(i=m;i<m+n;i++){
			if(i-m<j){
				dp[j][i] = 0;
			}else{
				dp[j][i] = b[i-m]+(j+1)*a[i-m];
			}
		}
	}
	
	ll ans = 0;
	for(i=m;i<m+n;i++){
		ans = max(ans,dp[k-1][i]);
	}
	cout << ans << endl;
}