#include <bits/stdc++.h>
using namespace std;
template <class T>
istream& operator>>(istream& is, vector<T>& xs) {
  for (int i = 0; i < xs.size(); i++) is >> xs[i];
  return is;
}
template <class T>
ostream& operator<<(ostream& os, vector<T>& xs) {
  if (xs.empty()) return os << "[]";
  os << "[" << xs[0];
  for (int i = 1; i < xs.size(); i++) os << " " << xs[i];
  return os << "]";
}
long long N, P, Q;
vector<long long> C;
int main() {
  cin >> N >> P >> Q;
  C.clear();
  C.resize(N);
  cin >> C;
  long long A = 0;
  vector<int> out;
  for (int i = N - 1; i >= 0; i--) {
    long long q = Q + i;
    long long s = (N - 1) - i - int(out.size());
    if ((2 * s + q) * P <= C[i]) {
      A += C[i] - (2 * s) * P;
      out.push_back(i);
    } else {
      A += P * q;
    }
  }
  cout << A << endl;
}
