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 <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#include <time.h>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
typedef vector<ll> vll;
typedef vector< vector<ll> > matrix;
#define REP(i, x, y) for(ll i = (ll)x; i < (ll)y; i++)
#define DREP(i, x, y, d) for(ll i = (ll)x; i < (ll)y; i += (ll)d)
#define PER(i, x, y) for(ll i = (ll)x; i > (ll)y; i--)
#define DPER(i, x, y, d) for(ll i = (ll)x; i > (ll)y; i -= (ll)d)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-12;

vector<ll> slidemax(const vector<ll> &seq, ll w) {
    vector<ll> ans;
    deque<ll> deq;
    ll l = 0, n = seq.size();
    REP(r, 0, n) {
        while(!deq.empty() && seq[deq.back()] <= seq[r]) {
            deq.pop_back();
        }
        deq.push_back(r);
        if (r >= w) {
            if (deq.front() == l) {
                deq.pop_front();
            }
            l++;
        }
        ans.push_back(seq[deq.front()]);
    }
    return ans;
}

ll dp[301][100010];

int main() {
    ll N, M, K;
    cin >> N >> M >> K;
    ll A[N];
    REP(i, 0, N) {
        cin >> A[i];
    }
    REP(i, 0, K + 1) {
        fill(dp[i], dp[i] + N + 1, 0);
    }
    REP(i, 1, K + 1) {
        vector<ll> seq;
        REP(j, 0, N) {
            seq.push_back(dp[i - 1][j]);
        }
        vector<ll> maxseq = slidemax(seq, M);
        // cout << maxseq.size() << " aaa ";
        // REP(j, 0, N) {
        //     cout << maxseq[j] << " ";
        // }
        // cout << endl;
        REP(j, 1, N + 1) {
            if (j >= i) {
                ll num = maxseq[j - 1];
                dp[i][j] = num + i * A[j - 1];
            }
        }
    }
    ll ans = 0;
    REP(i, 0, N + 1) {
        ans = max(ans, dp[K][i]);
    }
    cout << ans << endl;
}