#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
const double eps = 1e-12;
const long long MOD = 1e9 + 7;
const double PI = acos(-1.0);
const long long INF = 1e18;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> pref(n + 1, 0);
  pref[1] = a[0];
  for (long long i = 2; i <= n; i++) {
    pref[i] = pref[i - 1] + a[i - 1];
  }
  vector<long long> sums(n + 1, 0);
  for (long long i = 0; i + m <= n; i++) {
    sums[i] = pref[i + m] - pref[i];
  }
  long long dp[n + 1][k + 1];
  memset(dp, 0, sizeof(dp));
  for (long long i = 0; i <= n; i++) {
    for (long long j = 1; j <= k; j++) {
      if (i < j - 1) continue;
      dp[i][j] = max(((i - m >= 0) ? dp[i - m][j - 1] : 0) + sums[i],
                     ((i - 1 >= 0) ? dp[i - 1][j] : 0));
    }
  }
  long long ans = 0;
  for (long long i = 0; i <= n; i++) {
    ans = max(dp[i][k], ans);
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
