#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U>
ostream& operator<<(ostream& o, const pair<T, U>& p) {
  o << "(" << p.first << "," << p.second << ")";
  return o;
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "[";
  for (T t : v) {
    o << t << ",";
  }
  o << "]";
  return o;
}
int main() {
  int n;
  ll p, q;
  cin >> n >> p >> q;
  vector<ll> c(n);
  for (int(i) = 0; (i) < (int)(n); ++(i)) cin >> c[i];
  ll ans = 0;
  ll now = q;
  vector<ll> jisui(n);
  for (int(i) = 0; (i) < (int)(n); ++(i)) {
    jisui[i] = p * now;
    ans += jisui[i];
    ++now;
  }
  ll sub = 0;
  for (int i = n - 1; i >= 0; --i) {
    ll diff = c[i] - jisui[i] - sub;
    if (diff > 0)
      ans += diff;
    else
      sub += 2 * p;
  }
  cout << ans << endl;
  return 0;
}
