#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int const N = 5111;
ll p[N], sum[N], f[N][N];
int main() {
  ios_base ::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) cin >> p[i];
  partial_sum(p + 1, p + n + 1, sum + 1);
  for (int i = m; i <= n; ++i)
    for (int j = 1; j <= k; ++j) {
      f[i][j] = f[i - 1][j];
      f[i][j] = max(f[i][j], f[i - m][j - 1] + sum[i] - sum[i - m]);
    }
  cout << f[n][k] << endl;
  return 0;
}
