#include <bits/stdc++.h>
using namespace std;
constexpr char el = '\n';
constexpr long long inf = (long long)1e9 + 7;
const int maxn = (int)5007;
int n, m, k;
long long dp[2][maxn], maxel[maxn][maxn];
long long arr[maxn], sum[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  srand(time(nullptr));
  cin >> n >> m >> k;
  sum[0] = 0ll;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    sum[i] = sum[i - 1] + arr[i];
  }
  memset(dp, -inf, sizeof(dp));
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= k && m * j <= i; ++j) {
      dp[i & 1][j] =
          max(dp[i & 1 ^ 1][j], maxel[i - m][j - 1] + sum[i] - sum[i - m]);
      maxel[i][j] = max(maxel[i - 1][j], dp[i & 1][j]);
    }
  cout << dp[n & 1][k];
  return 0;
}
