#include <bits/stdc++.h>
using namespace std;
long long pref[5001];
long long dp[5001][5001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> pref[i];
  }
  pref[0] = 0;
  for (int i = 1; i <= n; i++) pref[i] += pref[i - 1];
  for (int i = 1; i <= k; i++) {
    for (int j = i * m; j <= n; j++) {
      dp[j][i] = max(pref[j] - pref[j - m] + dp[j - m][i - 1], dp[j - 1][i]);
    }
  }
  cout << dp[n][k] << endl;
}
