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:
/* ---------- STL Libraries ---------- */

// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>

// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>

// container library
#include <array>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>

/* ---------- Namespace ---------- */

using namespace std;

/* ---------- Type Abbreviation ---------- */

template <typename T>
using PQ = priority_queue<T>;
template <typename T>
using GPQ = priority_queue<T, vector<T>, greater<T>>;

using ll = long long;

#define fst first
#define snd second
#define mp make_pair
#define mt make_tuple

/* ---------- conversion ---------- */

#define INT(c) static_cast<int>(c)
#define CHAR(n) static_cast<char>(n)
#define LL(n) static_cast<ll>(n)
#define DOUBLE(n) static_cast<double>(n)

/* ---------- container ---------- */

#define ALL(v) (v).begin(), (v).end()
#define SIZE(v) (LL((v).size()))

#define FIND(v, k) (v).find(k) != (v).end()
#define VFIND(v, k) find(ALL(v), k) != (v).end()

#define gsort(b, e) sort(b, e, greater<decltype(*b)>())

/* ----------- debug ---------- */

template <class T>
ostream& operator<<(ostream& os, vector<T> v) {
    os << "[";
    for (auto vv : v)
        os << vv << ",";
    return os << "]";
}

template <class T>
ostream& operator<<(ostream& os, set<T> v) {
    os << "[";
    for (auto vv : v)
        os << vv << ",";
    return os << "]";
}

template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> p) {
    return os << "(" << p.fst << "," << p.snd << ")";
}

/* ---------- Constants ---------- */

// const ll MOD = 1e9 + 7;
// const int INF = 1 << 25;
// const ll INF = 1LL << 60;
// const double PI = acos(-1);
// const double EPS = 1e-10;
// mt19937 mert(LL(time(0)));

/* ---------- Short Functions ---------- */

template <typename T>
T sq(T a) {
    return a * a;
}

template <typename T>
T gcd(T a, T b) {
    if (a > b) return gcd(b, a);
    return a == 0 ? b : gcd(b % a, a);
}

template <typename T, typename U>
T mypow(T b, U n) {
    if (n == 0) return 1;
    if (n == 1) return b /* % MOD */;
    if (n % 2 == 0) {
        return mypow(b * b /* % MOD */, n / 2);
    } else {
        return mypow(b, n - 1) * b /* % MOD */;
    }
}

ll pcnt(ll b) {
    return __builtin_popcountll(b);
}

/* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */

class Segtree {
public:
    explicit Segtree(ll N) : V_NUM(1) {
        while (V_NUM < N) {
            V_NUM *= 2;
        }

        data.resize(V_NUM * 2);
        fill(data.begin(), data.end(), 0);
    }

    // 内部処理
    // kは節点のindex、[l, r)がその対応区間
    ll query(ll a, ll b, ll k, ll l, ll r) {
        // [a, b)と[l, r)が交わらない場合
        if (r <= a || b <= l) return 0;

        // [a, b)が[l, r)を包含する場合
        if (a <= l && r <= b) return data[k];

        // 他の場合
        // [l, r)を子に分割する
        ll vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
        ll vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
        return max(vl, vr);
    }

    // 外部呼び出し
    // [a, b)の最小値を求める
    ll query(ll a, ll b) {
        return query(a, b, 0, 0, V_NUM);
    }

    // 値の更新
    void update(ll i, ll v) {
        i += V_NUM - 1;
        data[i] = max(data[i], v);
        while (i > 0) {
            i = (i - 1) / 2;
            data[i] = max(data[i * 2 + 1], data[i * 2 + 2]);
        }
    }

    ll V_NUM;
    vector<ll> data;
};

int main() {
    ll N, M, K;
    cin >> N >> M >> K;

    ll A[N + 1];
    for (ll i = 1; i <= N; ++i) {
        cin >> A[i];
    }

    ll dp[N + 1];
    fill(dp, dp + N + 1, 0);
    // dp[n] = A_nをk個目として選んだときの最大スコア
    // kについて逐次更新

    for (ll k = 1; k <= K; ++k) {
        ll ndp[N + 1];
        deque<ll> que;
        for (ll i = 0; i < N; ++i) {
            // [i - M + 1, i]の最大値を求める
            while (!que.empty() && dp[que.back()] <= dp[i]) {
                que.pop_back();
            }
            que.push_back(i);
            while (que.front() <= i - M) {
                que.pop_front();
            }

            ndp[i + 1] = dp[que.front()] + A[i + 1] * k;
        }

        for (ll i = k; i <= N; ++i) {
            dp[i] = ndp[i];
        }
    }

    ll ans = 0;
    for (ll i = 1; i <= N; ++i) {
        ans = max(ans, dp[i]);
    }

    cout << ans << endl;
    return 0;
}