#include <bits/stdc++.h>
using namespace std;
const int N = 5e5;
long long int a[N], pre[N];
int n, m, k;
long long int dp[5002][5002];
long long int fun(int idx, int cur) {
  if (idx > n) {
    if (cur == k) return 0;
    return -1e15;
  }
  if (cur == k) return 0;
  long long int &check = dp[idx][cur];
  if (check != -1) return check;
  long long int ans1 = 0, ans2 = 0;
  if (idx + m - 1 <= n)
    ans1 = pre[idx + m - 1] - pre[idx - 1] + fun(idx + m, cur + 1);
  ans2 = fun(idx + 1, cur);
  return check = max(ans1, ans2);
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    pre[i] = pre[i - 1] + a[i];
  }
  memset(dp, -1, sizeof dp);
  long long int ans = fun(1, 0);
  cout << ans << endl;
  return 0;
}
