#include <bits/stdc++.h>
using namespace std;
const int Z = (int)5e3 + 111;
const int inf = (int)1e9 + 111;
const long long llinf = (long long)1e18 + 5;
const int MOD = (int)1e9 + 7;
int a[Z];
long long pref[Z], dp[Z][Z];
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    pref[i] = pref[i - 1] + a[i];
  }
  for (int i = 1; i <= k; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (j < m) continue;
      dp[i][j] = max(dp[i][j - 1], dp[i - 1][j - m] + pref[j] - pref[j - m]);
    }
  }
  cout << dp[k][n];
  return 0;
}
