#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, p, q;
  cin >> n >> p >> q;
  priority_queue<long long> que;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    que.push(x);
  }
  long long ans = n * (n - 1) / 2 * p + q * p * n, sum = 0;
  while (!que.empty()) {
    sum += que.top();
    que.pop();
    n--;
    ans = max(ans, sum + n * (n - 1) / 2 * p + q * p * n);
    q--;
  }
  cout << ans << endl;
  return 0;
}
