#include <bits/stdc++.h>
using namespace std;
struct Info {
  Info(long long int arg_value) { value = arg_value; }
  bool operator<(const struct Info &arg) const { return value < arg.value; };
  long long int value;
};
int main() {
  int N;
  long long int P, Q, tmp;
  scanf("%d %lld %lld", &N, &P, &Q);
  priority_queue<Info> PQ;
  for (int i = 1; i <= N; i++) {
    scanf("%lld", &tmp);
    PQ.push(Info(tmp + P * (i - 1)));
  }
  long long int sum = 0;
  int num_self = N;
  long long int ans = P * (num_self * Q + num_self * (num_self - 1));
  while (!PQ.empty()) {
    num_self--;
    sum += PQ.top().value;
    ans = max(ans, sum + P * (num_self * Q + num_self * (num_self - 1)));
    PQ.pop();
  }
  for (int i = 1; i <= N - 1; i++) ans -= P * i;
  printf("%lld\n", ans);
  return 0;
}
