import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip, std.regex;

immutable long INF = 1L << 59;

void main() {
    auto s = readln.split.map!(to!int);
    auto N = s[0];
    auto M = s[1];
    auto K = s[2];
    auto A = readln.split.map!(to!long).array;

    auto st = new SegmentTree[](2);
    st[0] = new SegmentTree(N);
    foreach (i; 0..N) st[0].assign(i, A[i]);
    int cur = 0, tar = 1;

    foreach (i; 1..K) {
        st[tar] = new SegmentTree(N);
        foreach (j; i..N) {
            int a = max(0, j - M);
            int b = j - 1;
            st[tar].assign(j, st[cur].sum(a, b) + A[j] * (i + 1));
        }
        swap(cur, tar);
    }

    st[cur].sum(0, N-1).writeln;
}

class SegmentTree {
    long[] table;
    int size;

    this(int n) {
        assert(bsr(n) < 29);
        size = 1 << (bsr(n) + 2);
        table = new long[](size);
        table.fill(-INF);
    }

    void assign(int pos, long num) {
        return assign(pos, num, 0, 0, size/2-1);
    }

    void assign(int pos, long num, int i, int left, int right) {
        if (left == right) {
            table[i] = num;
            return;
        }
        auto mid = (left + right) / 2;
        if (pos <= mid)
            assign(pos, num, i*2+1, left, mid);
        else
            assign(pos, num, i*2+2, mid+1, right);
        table[i] = max(table[i*2+1], table[i*2+2]);
    }

    long sum(int pl, int pr) {
        return sum(pl, pr, 0, 0, size/2-1);
    }

    long sum(int pl, int pr, int i, int left, int right) {
        if (pl > right || pr < left)
            return -INF;
        else if (pl <= left && right <= pr)
            return table[i];
        else
            return
                max(sum(pl, pr, i*2+1, left, (left+right)/2),
                    sum(pl, pr, i*2+2, (left+right)/2+1, right));
    }
}
