#include <bits/stdc++.h>
using namespace std;
long long dp[5010][5010], v[5010], n, m, k;
long long solve(long long pos, long long kk) {
  if (pos >= n + 1 or kk == k) {
    return 0;
  }
  long long &ans = dp[pos][kk];
  if (ans != -1) return ans;
  ans = 0;
  ans = max({ans, solve(pos + 1, kk),
             v[pos + m - 1] - v[pos - 1] + solve(pos + m, kk + 1)});
  return ans;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m >> k;
  for (long long i = 1; i <= n; ++i) {
    cin >> v[i];
    v[i] += v[i - 1];
  }
  memset(dp, -1, sizeof dp);
  cout << solve(1, 0);
}
