#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  vector<long long int> v(n);
  vector<long long int> presum(n, 0);
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
    if (i == 0) {
      presum[i] = v[i];
    } else
      presum[i] = presum[i - 1] + v[i];
  }
  vector<vector<long long int>> dp(k + 1, vector<long long int>(n, 0));
  for (long long int i = m - 1; i < n; i++) {
    if (i == (m - 1)) {
      dp[0][i] = presum[i];
    } else
      dp[0][i] = presum[i] - presum[i - m];
  }
  for (long long int i = m - 1; i < n; i++) {
    if (i > 0) {
      dp[1][i] = max(dp[0][i], dp[1][i - 1]);
    } else
      dp[1][i] = dp[0][i];
  }
  long long int cnt = m + m - 1;
  for (long long int i = 2; i < k + 1; i++) {
    for (long long int j = cnt; j < n; j++) {
      dp[i][j] = max(dp[i][j - 1], dp[i - 1][j - m] + dp[0][j]);
    }
    cnt += m;
  }
  cout << dp[k][n - 1] << "\n";
}
