#include <bits/stdc++.h>
using namespace std;
const int lim = 5005;
int arr[lim], n, m, k;
long long dp[lim][lim], pre[lim];
long long solve(int pos, int rem) {
  if (pos == n + 1)
    return (rem == 0 ? 0 : -1e18);
  else if (pos > n + 1 || rem < 0)
    return -1e18;
  long long& ans = dp[pos][rem];
  if (ans != -1) return ans;
  ans = max(solve(pos + m, rem - 1) + pre[pos + m - 1] - pre[pos - 1],
            solve(pos + 1, rem));
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  memset(dp, -1, sizeof dp);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    pre[i] = pre[i - 1] + arr[i];
  }
  cout << solve(0, k);
  return 0;
}
