#include <bits/stdc++.h>
using namespace std;
long long mn = INT_MAX;
long long mx = INT_MIN;
long long GCD(long long a, long long b) {
  if (!b) return a;
  return GCD(b, a % b);
}
long long LCM(long long a, long long b) { return (a * b) / GCD(a, b); }
long long NOD(long long x) {
  if (!x) return 0;
  return NOD(x / 10) + 1;
}
bool IsPrime(long long x) {
  for (long long i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
long long dp[5001][5001];
long long a[5001], n, m, k;
long long sum(long long i) {
  long long c = 0;
  for (int j = i; j < i + m; j++) c += a[j];
  return c;
}
long long solve(long long i, long long j) {
  if (i >= n - m + 1 || j == k) return 0;
  if (dp[i][j] != -1) return dp[i][j];
  long long ans1, ans2;
  ans1 = ans2 = -1000;
  ans1 = solve(i + 1, j);
  ans2 = solve(i + m, j + 1) + sum(i);
  return (dp[i][j] = max(ans1, ans2));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  memset(dp, -1, sizeof dp);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  cout << solve(0, 0);
  return 0;
}
