#include <bits/stdc++.h>
using namespace std;
long long n, p, Q;
int main() {
  cin >> n >> p >> Q;
  long long sum = 0;
  vector<pair<long long, long long> > V;
  for (int i = 0; i < n; i++) {
    long long C;
    cin >> C;
    sum += C;
    V.push_back(pair<long long, long long>((Q + i) * p - C, i));
  }
  sort(V.begin(), V.end(), greater<pair<long long, long long> >());
  long long ans = sum, a = 0;
  for (int i = 0; i < n; i++) {
    sum += V[i].first;
    a += p;
    ans = max(ans, sum + a);
  }
  cout << ans << endl;
  return 0;
}
