#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long p[5010];
vector<long long> acc = {0};
long long dp[5010][5010];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> p[i];
  for (int i = 0; i < n; i++) acc.push_back(acc.back() + p[i]);
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < k + 1; j++) {
      dp[i][j] = max(dp[i][j], dp[i - 1][j]);
      if (i >= m && j >= 1)
        dp[i][j] = max(dp[i][j], dp[i - m][j - 1] + acc[i] - acc[i - m]);
    }
  }
  cout << dp[n][k] << endl;
}
