#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int ddx[] = {1, 0};
int ddy[] = {1, 1};
int n, m, k;
int vec[5050];
long long int sum[5050];
long long int pd[5050][5050];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> vec[i];
  sum[1] = vec[0];
  for (int i = 2; i <= n; i++) sum[i] = sum[i - 1] + vec[i - 1];
  for (int i = 1; i <= k; i++) {
    for (int j = 1; j <= n; j++) {
      if (i * m > j)
        pd[i][j] = 0;
      else
        pd[i][j] = max(pd[i][j - 1], pd[i - 1][j - m] + sum[j] - sum[j - m]);
    }
  }
  cout << pd[k][n] << endl;
  return 0;
}
