#include <bits/stdc++.h>
using namespace std;
const long long init = 1e9 + 7;
vector<long long> v1(5010);
vector<long long> v2(5010, 0);
long long arr[5010][5010];
long long n, m, counti;
long long func(int start, int k) {
  long long a, b;
  if (start > n - m) return 0;
  if (k <= 0) return 0;
  if (arr[start][k] == -1) {
    a = v2[start] + func(start + m, k - 1);
    b = func(start + 1, k);
    arr[start][k] = max(a, b);
  }
  return arr[start][k];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long k;
  cin >> n >> m >> k;
  counti = 0;
  for (int i = 0; i < 5010; ++i) {
    for (int j = 0; j < 5010; ++j) {
      if (j == 0) arr[i][j] = 0;
      if (i > n - m) arr[i][j] = 0;
      arr[i][j] = -1;
    }
  }
  for (int i = 0; i < n; ++i) cin >> v1[i];
  for (int i = 0; i < m; ++i) v2[0] += v1[i];
  for (int i = 1; i <= n - m; ++i) {
    v2[i] = v2[i - 1] - v1[i - 1] + v1[i + m - 1];
  }
  long long ans = func(0, k);
  cout << ans << "\n";
  return 0;
}
