#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
vector<int> nums;
int P, Q;
long long int getans(int self) {
  long long int hap = P * Q * self;
  for (int i = 0; i < nums.size(); ++i) {
    bool usekit = false;
    if (self == 0) {
      usekit = true;
    } else if (self == nums.size() - i) {
      usekit = false;
    } else {
      int useself = (self - 1) * P;
      int usekitch = nums[i] - self * P;
      if (usekitch > useself) {
        usekit = true;
      } else {
        usekit = false;
      }
    }
    if (usekit) {
      hap += nums[i] - self * P;
    } else {
      hap += (self - 1) * P;
      self--;
    }
  }
  return hap;
}
int main() {
  int N;
  cin >> N >> P >> Q;
  for (int i = 0; i < N; ++i) {
    int c;
    cin >> c;
    nums.push_back(c);
  }
  int amin = 0;
  int amax = N;
  while (amin + 2 < amax) {
    const int amid1 = (amin * 2 + amax) / 3;
    const int amid2 = (amin + amax * 2) / 3;
    const long long int ans1 = getans(amid1);
    const long long int ans2 = getans(amid2);
    if (ans1 < ans2) {
      amin = amid1;
    } else {
      amax = amid2;
    }
  }
  long long int ans = -99999999999999999;
  for (int i = amin; i <= amax; ++i) {
    ans = max(ans, getans(i));
  }
  cout << ans << endl;
  return 0;
}
