#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, k, curr = 0;
  cin >> n >> m >> k;
  long long B[n + 1][k + 1];
  vector<long long> A(n + 1), C(n + 1);
  for (int i = 1; i <= n; i++) cin >> A[i];
  for (int i = 1; i < m; i++) {
    curr += A[i];
  }
  for (int i = m; i <= n; i++) {
    curr += A[i];
    curr -= A[i - m];
    C[i] = curr;
  }
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= k; j++) {
      if (i == 0 || j == 0) {
        B[i][j] = 0;
        continue;
      }
      if (i < m) {
        B[i][j] = max(B[i - 1][j], C[i]);
        continue;
      }
      B[i][j] = max(B[i - 1][j], B[i - m][j - 1] + C[i]);
    }
  }
  cout << B[n][k];
  return 0;
}
