#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chadd(T &a, T b) {
  a = a + b;
}
long long int dx[] = {0, 0, 1, -1};
long long int dy[] = {1, -1, 0, 0};
constexpr long long INF = 1001001001001001LL;
constexpr long long MOD = 1000000007LL;
long long int N, P, Q, C[500010];
long long int dp[2][500010];
signed main() {
  cin >> N >> P >> Q;
  for (long long int(i) = (0); (i) < (N); (i)++) cin >> C[i];
  for (long long int(i) = (0); (i) < (2); (i)++)
    for (long long int(j) = (0); (j) <= (N); (j)++) dp[i][j] = -INF;
  dp[0][0] = 0;
  long long int ans = -INF;
  for (long long int(i) = (0); (i) < (N); (i)++)
    for (long long int(j) = (0); (j) <= (i); (j)++) {
      long long int v = i % 2;
      if (dp[v][j] == -INF) continue;
      chmax(dp[v ^ 1][j], dp[v][j] + C[i]);
      long long int S = Q + j - (i - j);
      chmax(dp[v ^ 1][j + 1], dp[v][j] + P * S);
      dp[v][j] = -INF;
    }
  for (long long int(i) = (0); (i) <= (N); (i)++) chmax(ans, dp[N % 2][i]);
  cout << ans << endl;
  return 0;
}
