#include <bits/stdc++.h>
using namespace std;
long long DP[2][3000000];
long long INF = 1L << 50;
static long long MED = 1500000;
int main() {
  long long N, pair<int, int>, Q;
  scanf("%lld %lld %lld", &N, &pair<int, int>, &Q);
  long long C[N];
  for (int i = 0; i < N; i++) {
    scanf("%lld", &C[i]);
  }
  for (int i = 0; i < 3000000; i++) {
    DP[0][i] = -INF;
    DP[1][i] = -INF;
  }
  DP[0][Q - 1 + MED] = C[0];
  DP[0][Q + 1 + MED] = pair<int, int> * Q;
  long long ans = -INF;
  if (N == 1) {
    ans = max(DP[0][Q - 1 + MED], max(DP[0][Q + 1 + MED], ans));
  }
  for (int i = 1; i < N; i++) {
    for (int j = 0; j < 3000000; j++) {
      if (i % 2 == 0) {
        if (DP[1][j] == -INF) continue;
        DP[0][j + 1] = DP[1][j] + pair<int, int> * (j - MED);
        DP[0][j - 1] = max(DP[1][j] + C[i], DP[0][j - 1]);
        if (i == N - 1) {
          ans = max(DP[0][j - 1], max(DP[0][j + 1], ans));
        }
      } else {
        if (DP[0][j] == -INF) continue;
        DP[1][j + 1] = DP[0][j] + pair<int, int> * (j - MED);
        DP[1][j - 1] = max(DP[0][j] + C[i], DP[1][j - 1]);
        if (i == N - 1) {
          ans = max(DP[1][j - 1], max(DP[1][j + 1], ans));
        }
      }
    }
  }
  printf("%lld\n", ans);
}
