#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long p[5005];
long long pre[5005];
long long dp[5005][5005];
long long rec(long long level, long long closepos) {
  if (closepos > n) return -1e18;
  if (level == k) return 0;
  if (dp[level][closepos] != -1) {
    return dp[level][closepos];
  }
  long long ans = -1e18;
  ans = max(ans,
            pre[closepos + m] - pre[closepos] + rec(level + 1, closepos + m));
  ans = max(ans, rec(level, closepos + 1));
  return dp[level][closepos] = ans;
}
long long solve() {
  cin >> n >> m >> k;
  for (long long i = 1; i < n + 1; i++) {
    cin >> p[i];
    pre[i] = pre[i - 1] + p[i];
  }
  memset(dp, -1, sizeof(dp));
  long long ans = rec(0, 0);
  cout << ans << endl;
  return 0;
}
signed main() {
  long long t;
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
