#include <bits/stdc++.h>
const int Maxn = 5005;
using namespace std;
int n, m, k;
long long a[Maxn];
long long sum[Maxn];
long long dp[Maxn][Maxn];
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (int i = 1; i <= n; i++) {
    if (i <= m)
      sum[i] = sum[i - 1] + a[i];
    else
      sum[i] = sum[i - 1] - a[i - m] + a[i];
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= k; j++)
      if (i >= m) {
        dp[i][j] = max(dp[i][j], dp[i - 1][j]);
        dp[i][j] = max(dp[i][j], dp[i - m][j - 1] + sum[i]);
      }
  printf("%lld", dp[n][k]);
}
