#include <bits/stdc++.h>
using namespace std;
long long dp[5005][5005];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  long long a[n];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] += a[i - 1];
  }
  for (int i = 1; i <= k; i++) {
    for (int j = m; j <= n; j++)
      dp[i][j] = max(dp[i][j - 1], dp[i - 1][j - m] + a[j] - a[j - m]);
  }
  cout << dp[k][n] << endl;
}
