#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 5e3 + 5;
long long gcd(long long n, long long m) {
  if (n == 0)
    return m;
  else {
    return gcd(m % n, n);
  }
}
long long dp[N][N];
long long n, m;
long long a[N];
long long pre[N];
long long go(long long pos, long long k) {
  if (pos == n + 1) {
    return 0;
  }
  long long &ans = dp[pos][k];
  if (ans != -1) return ans;
  ans = 0;
  ans = max(ans, go(pos + 1, k));
  if (pos + m - 1 <= n && k > 0) {
    ans = max(ans, pre[pos + m - 1] - pre[pos - 1] + go(pos + m, k - 1));
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long k;
  cin >> n >> m >> k;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    pre[i] = pre[i - 1] + a[i];
  }
  memset(dp, -1, sizeof(dp));
  cout << go(1, k) << endl;
}
