#include <bits/stdc++.h>
using namespace ::std;
const int MOD = 1000000007, INF = 2e9, MAX = 2e6;
long long int a[MAX], b[MAX], C[MAX];
vector<long long int> v;
long long int dp[5001][5001];
long long int n, m, k;
long long int sum[MAX];
int main() {
  std::ios_base::sync_with_stdio(false);
  long long int i, j;
  cin >> n >> m >> k;
  sum[0] = 0;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  for (i = 0; i <= n; i++) {
    for (j = 0; j <= k; j++) dp[i][j] = -INF;
  }
  for (i = 0; i <= n; i++) {
    dp[i][0] = 0;
  }
  sum[0] = 0;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= k; j++) {
      dp[i][j] = dp[i - 1][j];
      if (i - m >= 0)
        dp[i][j] = max(dp[i][j], dp[i - m][j - 1] + sum[i] - sum[i - m]);
    }
  }
  cout << dp[n][k];
}
