#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int N, P, Q;
  cin >> N >> P >> Q;
  vector<long long int> Ci(N + 1);
  for (long long int i = (1); i < (N + 1); ++i) {
    cin >> Ci[i];
  }
  long long int sum = P * Q * N + P * N * (N - 1) / 2;
  long long int shoku = 0;
  for (long long int i = N; i >= 1; --i) {
    long long int a = Ci[i] - P * (Q + i - 1) - 2 * (N - i - shoku);
    if (a > 0) {
      sum += a;
      shoku++;
    }
  }
  cout << sum << endl;
}
