#include <bits/stdc++.h>
using namespace std;
long long dp[5010][5010], a[5010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, k, i, j;
  cin >> n >> m >> k;
  for (i = 1; i <= n; i++) cin >> a[i], a[i] += a[i - 1];
  for (i = 1; i <= n; i++)
    for (j = 1; j <= k && j <= i / m; j++)
      dp[i][j] = max(dp[i - 1][j], dp[i - m][j - 1] + a[i] - a[i - m]);
  cout << dp[n][k] << "\n";
  return 0;
}
