#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long int INF = 9e18 + 2e17;
const int inf = 2e9;
const double eps = 1e-10;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  std::vector<long long int> a(n + 1);
  for (int i = (int)0; i < (int)n; i++) {
    cin >> a[i + 1];
    a[i + 1] += a[i];
  }
  std::vector<std::vector<long long int> > dp(
      n + 1, std::vector<long long int>(k + 1));
  for (int i = (int)1; i < (int)n + 1; i++) {
    for (int j = (int)1; j < (int)k + 1; j++) {
      if (i - m >= 0) dp[i][j] = a[i] - a[i - m] + dp[i - m][j - 1];
      dp[i][j] = max(dp[i][j], dp[i - 1][j]);
    }
  }
  cout << dp[n][k] << endl;
}
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
