#include <bits/stdc++.h>
long long power(long long x, unsigned long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) {
      res = res * x;
    }
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long powermod(long long x, unsigned long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % p;
    }
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
using namespace std;
long long Mod(long long x, long long m) {
  if (x > 0) return x % m;
  long long mul = -x / m + 5;
  x += m * mul;
  return x % m;
}
long long n, m, k;
long long arr[100000];
long long sum[100000];
long long dp[5001][5001];
long long solve(long long index, long long number) {
  if (number == k) {
    return 0;
  }
  if (dp[index][number] != -1) {
    return dp[index][number];
  }
  if (index > n) {
    return 0;
  }
  long long res = 0;
  long long prev = 0;
  for (long long i = index; i <= n; i++) {
    if (i + m - 1 <= n && sum[i + m - 1] - sum[i - 1] > prev) {
      prev = sum[i + m - 1] - sum[i - 1];
      res = max(res, sum[i + m - 1] - sum[i - 1] + solve(i + m, number + 1));
    }
  }
  return dp[index][number] = res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n >> m >> k;
  memset(dp, -1, sizeof(dp));
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  sum[0] = 0;
  for (long long i = 1; i <= n; i++) {
    sum[i] = arr[i] + sum[i - 1];
  }
  long long ans = 0;
  long long prev = 0;
  for (long long i = 1; i <= n; i++) {
    if (i + m - 1 <= n && prev < sum[i + m - 1] - sum[i - 1]) {
      prev = sum[i + m - 1] - sum[i - 1];
      ans = max(ans, sum[i + m - 1] - sum[i - 1] + solve(i + m, 1));
    }
  }
  cout << ans << '\n';
  return 0;
}
