#include <bits/stdc++.h>
using namespace std;
long long b[1000000], c[1000000], x[1000000], n, p, q, sum;
pair<long long, long long> a[1000000];
int main() {
  cin >> n >> p >> q;
  c[0] = p * q;
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    a[i].first = b[i];
    a[i].second = i;
  }
  sort(a, a + n);
  for (int i = 1; i < n; i++) {
    c[i] = c[i - 1] + p;
  }
  for (int i = 0; i < n; i++) {
    if (c[i] + (c[n - 1] - c[i]) >= a[i].first) {
      x[a[i].second] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    if (x[i] == 1) {
      sum += p * q;
      q++;
    } else {
      sum += b[i];
      q--;
    }
  }
  cout << sum << endl;
  return 0;
}
