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:
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
#define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i))
#define rep(i,j) FOR(i,0,j)
#define each(x,y) for(auto &(x):(y))
#define mp make_pair
#define MT make_tuple
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<(x)<<endl
#define smax(x,y) (x)=max((x),(y))
#define smin(x,y) (x)=min((x),(y))
#define MEM(x,y) memset((x),(y),sizeof (x))
#define sz(x) (int)(x).size()
#define RT return
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;

template<class Val, class Cmp>
struct SlidingWindow {
    SlidingWindow(const vector<Val> &a) :cmp(), a(a), l(0), r(0), deq() {
    }
    void proceedTo(int lef, int rig) {
        while (r < rig)stepR();
        while (l < lef)stepL();
    }
    void stepL() {
        if (deq[0] == l++) deq.pop_front();
    }
    void stepR() {
        while (!deq.empty() && !cmp(a[deq.back()], a[r])) deq.pop_back();
        deq.push_back(r++);
    }
    int getIndex() {
        return deq[0];
    }
    Val getValue() {
        return a[deq[0]];
    }
    Cmp cmp;
    vector<Val> a;
    int l, r;
    deque<int> deq;
};
using SlidingMin32 = SlidingWindow<int, less<int>>;
using SlidingMax32 = SlidingWindow<int, greater<int>>;
using SlidingMin64 = SlidingWindow<long long, less<long long>>;
using SlidingMax64 = SlidingWindow<long long, greater<long long>>;

/*
最大値のスライド
[i, i+K)の最大値をすべて求める。
O(|data|)
*/
template<class Val>
vector<Val> maxSlide(int length, vector<Val> data, Val minValue = -1) {
    int num = (int)data.size();
    deque<int> deq;
    vector<Val> res(num, minValue);
    for (int i = 0; i < num; ++i) {
        while (!deq.empty() && data[deq.back()] <= data[i]) {
            deq.pop_back();
        }
        deq.push_back(i);
        if (i >= length - 1) {
            res[i - length + 1] = data[deq.front()];
            if (deq.front() == i - length + 1)deq.pop_front();
        }
    }
    for (int i = 1; i < length; ++i) {
        res[num - i] = data[deq.front()];
    }
    return res;
}

void solve() {
    int N, M, K;
    cin >> N >> M >> K;
    vi A(N);
    rep(i, N)cin >> A[i];

    const ll MI = LLONG_MIN / 3;
    vll cur(N + 1, MI), nex(N + 1);
    rep(i, N)cur[i + 1] = A[i];
    rep(i, K - 1) {
        fill(all(nex), MI);
        SlidingMax64 ma(cur);
        for (int j = 1; j <= N; ++j) {
            ma.proceedTo(max(0, j - M), j);
            nex[j] = ma.getValue() + A[j - 1] * (i + 2ll);
        }
        swap(cur, nex);
    }
    ll ans = *max_element(all(cur));
    cout << ans << endl;
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(15);
	solve();
	return 0;
}