#include <bits/stdc++.h>
using namespace std;
int m, n;
signed long long int d[5002], dp[5002][5002];
bool fdp[5002][5002];
signed long long int p[5002];
signed long long int rec(int i, int k) {
  if (i + m - 1 > n && k > 0) return -100000000000000000LL;
  if (i > n && k == 0) return 0;
  if (k == 0) return 0;
  if (fdp[i][k]) return dp[i][k];
  dp[i][k] = max(rec(i + 1, k), p[i + m - 1] - p[i - 1] + rec(i + m, k - 1));
  fdp[i][k] = 1;
  return dp[i][k];
}
int main() {
  int k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) cin >> d[i];
  for (int i = 1; i <= n; ++i) p[i] = p[i - 1] + d[i];
  cout << rec(1, k);
}
