#include <bits/stdc++.h>
using namespace std;
long long int mas[5000], sums[5001] = {}, d[5001][5001] = {};
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> mas[i];
  for (int i = 1; i <= n; i++) {
    sums[i] = sums[i - 1] + mas[i - 1];
    for (int kk = 1; kk <= k; kk++) {
      d[i][kk] = d[i - 1][kk];
      if (i >= m)
        d[i][kk] = max(d[i][kk], d[i - m][kk - 1] + sums[i] - sums[i - m]);
    }
  }
  cout << d[n][k];
}
