#include <bits/stdc++.h>
using namespace std;
long long n, m, k, pref[5005], dp[5005][5005], arr[5005], ans;
long long cari(int xnow, int know) {
  if (xnow == n + 1 && know == k) return 0;
  if (xnow == n + 1) return -2000000000;
  ;
  if (dp[xnow][know] != -1) return dp[xnow][know];
  long long &ret = dp[xnow][know] = 0;
  ret = max(ret, cari(xnow + 1, know));
  if (xnow + m - 1 <= n && know + 1 <= k)
    ret = max(ret,
              pref[xnow + m - 1] - pref[xnow - 1] + cari(xnow + m, know + 1));
  return ret;
}
int main() {
  scanf("%I64d %I64d %I64d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%I64d", &arr[i]);
  for (int i = 1; i <= n; i++) pref[i] = pref[i - 1] + arr[i];
  memset(dp, -1, sizeof(dp));
  ans = cari(1, 0);
  cout << ans << endl;
}
