public static void main(String... args) throws IOException {
        MyScanner sc = new MyScanner();
        int n = sc.nextInt();
        int m = sc.nextInt();
        int k = sc.nextInt();

        int[] t = new int[n];
        long[] mSums = new long[n];
        long[][] memo = new long[n][2];
        for (int i = 0; i < n; i++) {
            t[i] = sc.nextInt();
        }

        for (int i = 0; i < n; i++) {
            mSums[i] = (i == 0 ? 0L : mSums[i - 1]) - (i >= m ? t[i - m] : 0) + t[i];
        }

        for (int u = 1; u <= k; u++) {
            for (int i = 0; i < n; i++) {
                memo[i][u % 2] = Math.max(i == 0 ? 0 : memo[i - 1][u % 2],
                            i + 1 < m ? 0 : (mSums[i] + ( i - m < 0 ? 0 : memo[i - m][(u + 1) % 2])));
            }
        }

        System.out.println(Math.max(memo[n - 1][0], memo[n - 1][1]));

    }