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