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>
#define For(i, a, b) for(int (i)=(int)(a); (i)<(int)(b); ++(i))
#define rFor(i, a, b) for(int (i)=(int)(a)-1; (i)>=(int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
typedef pair<int, lint> pil;
typedef pair<lint, lint> pll;
template<class T> bool chmax(T &a, const T &b){if(a<b){a=b; return true;} return false;}
template<class T> bool chmin(T &a, const T &b){if(a>b){a=b; return true;} return false;}
template<class T> T div_floor(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>=0 ? a/b : (a+1)/b-1;
}
template<class T> T div_ceil(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>0 ? (a-1)/b+1 : a/b;
}

constexpr lint mod = 1e9+7;
constexpr lint INF = mod * mod;
constexpr int MAX = 100010;

void push(deque<pil> &dq, pil p){
    while(!dq.empty() && dq.back().se <= p.se) dq.pop_back();
    dq.push_back(p);
}

void pop(deque<pil> &dq, int j, int m){
    while(!dq.empty() && dq.front().fi < j-m) dq.pop_front();
}

lint getval(deque<pil> &dq){
    return dq.front().se;
}

int main(){
    int n, m, K;
    scanf("%d%d%d", &n, &m, &K);
    lint a[n+1];
    rep(i, n) scanf("%lld", &a[i+1]);
    lint dp[K+1][n+1];
    rep(i, K+1)rep(j, n+1) dp[i][j] = -1;
    For(j, 1, n+1) dp[1][j] = a[j];
    For(i, 2, K+1){
        deque<pil> dq;
        For(j, max(1, i-m), i) push(dq, {j, dp[i-1][j]});
        For(j, i, n+1){
            pop(dq, j, m);
            dp[i][j] = a[j]*i + getval(dq);
            push(dq, {j, dp[i-1][j]});
        }
    }
    lint ans = 0;
    rep(j, n+1) chmax(ans, dp[K][j]);
    printf("%lld\n", ans);
}