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 JAVA):

Solution:
import java.io.*;
import java.util.*;


class Main {
    static final long I=1L<<53;
    static void mEqN(int n,int k,long[]a){
        long[]ans=new long[k+1];
        Arrays.fill(ans,-I);
        ans[0]=0;
        for(int i=0;i<n;++i){
            for(int j=Math.min(i+1,k);j>=1;--j){
                ans[j]=Math.max(ans[j],ans[j-1]+j*a[i]);
            }
        }
        out.println(ans[k]);
    }
    static void solve(int n,int m,int k,long[]a){
        long[][]dp=new long[2][n];
        for(int i=0;i<n;++i){
            dp[0][i]=a[i];
        }
        int[]deq=new int[n];
        int s=0,t=0;
        for(int i=1;i<k;++i){
            s=0;t=0;
            int u=(i-1)%2;
            int nxt=1-u;
            for(int j=i-1;j<n;++j){
                if(j>=i){
                    assert s < t;
                    long val=dp[u][deq[s]]+(i+1)*a[j];
                    dp[nxt][j]=val;
                    if(deq[s]==j-m)s++;
                }
                while(s<t&&dp[u][deq[t-1]]<=dp[u][j])t--;
                deq[t++]=j;
            }
        }
        long ans=0;
        for(int i=k-1;i<n;++i)ans=Math.max(ans,dp[(k-1)%2][i]);
        out.println(ans);
    }
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        int n=sc.nextInt();
        int m=sc.nextInt();
        int k=sc.nextInt();
        long[]a=new long[n];
        for(int i=0;i<n;++i){
            a[i]=sc.nextLong();
        }
        solve(n,m,k,a);
        out.close();
    }
    // http://codeforces.com/blog/entry/7018
    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;
    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}
class MaxSegmentTree {
    static final int SIZE = 1 << 18;
    static final long INFINITY = (1L << 62) - 1;
    long[] seg;
    MaxSegmentTree() {
	this.seg = new long[2 * SIZE];
    }
    void update(int x, long value) {
	x += SIZE - 1;
	this.seg[x] = value;
	while (x > 0) {
	    x = (x - 1) / 2;
	    this.seg[x] = Math.max(this.seg[2 * x + 1], this.seg[2 * x + 2]);
	}
    }
    long query(int l, int r) {
	l += SIZE - 1;
	r += SIZE - 1;
        long y = -INFINITY;
	while (l < r) {
	    if ((l & 1) == 0) {
		y = Math.max(y, this.seg[l]);
	    }
	    if ((r & 1) == 0) {
		y = Math.max(y, this.seg[r - 1]);
	    }
	    l /= 2;
	    r = (r - 1) / 2;
	}
	return y;
    }
}