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