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