#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int n, m, k;
  cin >> n >> m >> k;
  vector<vector<long long> > dp;
  dp.resize(n);
  for (int i = (0); i < n; i++) {
    dp[i].resize(k + 1);
  }
  long long* arr = new long long[n];
  for (int i = (0); i < n; i++) cin >> arr[i];
  for (int i = (0); i < m - 1; i++) {
    for (int j = (0); j < k + 1; j++) {
      dp[i][j] = 0;
    }
  }
  long long acc = 0;
  for (int i = (0); i < m; i++) acc += arr[i];
  dp[m - 1][0] = 0;
  for (int i = (0); i < n; i++) dp[i][0] = 0;
  for (int j = (1); j < k + 1; j++) dp[m - 1][j] = acc;
  for (int i = (m); i < n; i++) {
    acc -= arr[i - m];
    acc += arr[i];
    for (int c = (1); c < k + 1; c++) {
      dp[i][c] = max(dp[i - 1][c], dp[i - m][c - 1] + acc);
    }
  }
  cout << dp[n - 1][k];
}
