#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  long long n, p, q;
  cin >> n >> p >> q;
  vector<long long> c(n);
  for (int i = 0; i < (int)(n); i++) cin >> c[n - 1 - i];
  long long sum = p * (n * q + n * (n - 1) / 2);
  long long out = 0;
  for (int i = 0; i < (int)(n); i++) {
    long long in = i - out, Q = q + (n - 1 - i);
    if (2 * in * p + Q <= c[i]) {
      sum += c[i] - 2 * in * p - Q;
      out++;
    }
  }
  cout << sum << endl;
}
