#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long int fac[1000005];
long long int modularExponentiation(long long int x, long long int n,
                                    long long int M) {
  long long int result = 1;
  while (n > 0) {
    if (n % 2 == 1)
      result = ((result % 1000000007ll) * (x % 1000000007ll)) % 1000000007ll;
    x = ((x % 1000000007ll) * (x % 1000000007ll)) % 1000000007ll;
    n = n / 2;
  }
  return result;
}
long long int binaryExponentiation(long long int x, long long int n) {
  long long int result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = result * x;
    x = x * x;
    n = n / 2;
  }
  return result;
}
long long int pow1(long long int x, long long int y) {
  long long int z = 1;
  while (y--) {
    z = z * x;
  }
  return z;
}
bool isprime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long int modInverse(long long int n, long long int p) {
  return modularExponentiation(n, p - 2, p);
}
unsigned long long nCrModPFermat(unsigned long long n, long long int r,
                                 long long int p) {
  if (r == 0) return 1;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
long long int check(long long int x, long long int y) {
  long long int z = 1;
  long long int ans = 0;
  while (z < x) {
    ans++;
    z *= y;
  }
  return ans;
}
long long int countbits(long long int n) {
  long long int x = 0;
  while (n > 0) {
    x++;
    n = (n & (n - 1));
  }
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, k;
  cin >> n >> m >> k;
  vector<long long int> pref(n);
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (i == 0)
      pref[i] = x;
    else
      pref[i] = x + pref[i - 1];
  }
  long long int mx[n - m + 1][k + 1];
  long long int ans = 0;
  for (long long int i = 0; i <= (n - m); i++) {
    vector<long long int> dp(k + 1);
    long long int l = i, r = i + m - 1;
    long long int s = pref[r];
    if (l != 0) s -= pref[l - 1];
    for (long long int j = 1; j <= k; j++) {
      if (j == 1)
        dp[j] = s;
      else {
        if (i >= m)
          dp[j] = mx[i - m][j - 1] + s;
        else
          dp[j] = 0;
      }
    }
    for (long long int j = 1; j <= k; j++) {
      if (i == 0)
        mx[i][j] = dp[j];
      else
        mx[i][j] = max(mx[i - 1][j], dp[j]);
    }
    ans = max(ans, dp[k]);
  }
  cout << ans;
}
