#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)5e5 + 10;
const int INF = (int)0x3f3f3f3f;
long long N, P, Q;
long long C[MAXN];
void work() {
  scanf("%lld%lld%lld", &N, &P, &Q);
  for (int i = 0; i < N; i++) scanf("%lld", &C[i]);
  long long ans = (long long)P * (N * (2 * Q + N - 1) / 2);
  for (int i = 0; i < N; i++) C[i] = C[i] - P * Q - P * i + 2 * i - 2 * (N - 1);
  sort(C, C + N);
  for (int i = 0; i < N; i++) {
    if (C[N - 1 - i] + P * i * 2 > 0)
      ans += C[N - 1 - i] + P * i * 2;
    else
      break;
  }
  printf("%lld\n", ans);
}
int main() {
  work();
  return 0;
}
