#include <bits/stdc++.h>
using namespace std;
const long long mxi = 5e4 + 666;
const long long mod = 1e9 + 7;
long long n, m, k, p[6666];
int main() {
  cin >> n >> m >> k;
  for (long long i = 1; i <= n; i++) {
    cin >> p[i];
    p[i] += p[i - 1];
  }
  long long dp[k + 1][n + 1];
  for (long long i = 0; i < k + 1; i++)
    for (long long j = 0; j < n + 1; j++) dp[i][j] = 0;
  for (long long i = 1; i <= k; i++) {
    for (long long j = m; j <= n; j++) {
      dp[i][j] = max(dp[i][j - 1], dp[i - 1][j - m] + p[j] - p[j - m]);
    }
  }
  cout << dp[k][n];
}
