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