#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7, N = 5e3 + 5;
long long n, m, k;
long long dp[N][N];
long long recurive(long long u, long long x, vector<long long> &a,
                   vector<long long> &pref) {
  if (u >= n) return 0;
  if (x == k) return dp[u][x] = 0;
  if (dp[u][x] != -1) return dp[u][x];
  return dp[u][x] =
             max(recurive(u + 1, x, a, pref),
                 (u + m <= n)
                     ? (recurive(u + m, x + 1, a, pref) + pref[u + m] - pref[u])
                     : 0ll);
}
long long solve() {
  cin >> n >> m >> k;
  memset(dp, -1, sizeof(dp));
  vector<long long> a(n), pref(n + 1, 0);
  for (long long i = (long long)0; i < n; i++) cin >> a[i];
  for (long long i = (long long)1; i < n + 1; i++) {
    pref[i] = pref[i - 1] + a[i - 1];
  }
  long long ans = recurive(0, 0, a, pref);
  return ans;
}
int32_t main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << solve() << '\n';
}
