#include <bits/stdc++.h>
using namespace std;
long long C[(int)5e5];
map<pair<int, int>, long long> dp;
int N, P, Q;
long long int solve(int d, int k) {
  cout << d << " " << k << endl;
  if (d == N) return 0;
  if (dp[make_pair(d, k)] > 0) return dp[make_pair(d, k)];
  long long q = Q + 2 * k - d;
  if (C[d] <= P * q) {
    dp[make_pair(d, k)] = P * q + solve(d + 1, k + 1);
  } else {
    dp[make_pair(d, k)] =
        max(C[d] + solve(d + 1, k), P * q + solve(d + 1, k + 1));
  }
  return dp[make_pair(d, k)];
}
int main() {
  cin >> N >> P >> Q;
  for (int i = 0; i < N; ++i) cin >> C[i];
  cout << solve(0, 0) << endl;
  return 0;
}
