#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long p[5100];
long long dp[5100][5100];
int main() {
  ios ::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> p[i];
  for (int i = m - 1; i < n; i++) {
    long long sum = 0;
    for (int j = i; j > i - m; j--) {
      sum += p[j];
    }
    if (i == 0)
      dp[0][i] = sum;
    else
      dp[0][i] = max(dp[0][i - 1], sum);
  }
  for (int i = 1; i < k; i++)
    for (int j = (i + 1) * m - 1; j < n; j++) {
      long long sum = 0;
      for (int l = j; l > j - m; l--) sum += p[l];
      dp[i][j] = max(dp[i][j - 1], dp[i - 1][j - m] + sum);
    }
  cout << dp[k - 1][n - 1] << endl;
  return 0;
}
