#include <bits/stdc++.h>
using namespace std;
const int maxn = 5005;
int n, m, k;
int a[maxn];
long long s[maxn], f[maxn][maxn];
void solve() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) s[i] = s[i - 1] + a[i];
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= k; ++j) {
      f[i][j] = f[i - 1][j];
      if (i >= m) f[i][j] = max(f[i][j], f[i - m][j - 1] + s[i] - s[i - m]);
    }
  long long ans = 0;
  for (int i = 1; i <= n; ++i) ans = max(ans, f[i][k]);
  cout << ans;
}
int main() { solve(); }
