#include <bits/stdc++.h>
using namespace std;
int ans = -500000, N, P, Q;
int C[500000];
vector<pair<int, int> > pairs;
int cook_k_times(int k, int Q, int P) {
  int H = 0;
  int Q_buff = Q;
  bool label[500000] = {};
  for (int i = 0; i < k; ++i) label[pairs[i].second] = true;
  for (int i = 0; i < N; ++i) {
    if (label[i]) {
      H += P * Q_buff;
      Q_buff++;
    } else {
      H += C[i];
      Q_buff--;
    }
  }
  return H;
}
int main() {
  cin >> N >> P >> Q;
  for (int i = 0; i < N; ++i) {
    cin >> C[i];
    pairs.push_back(make_pair(C[i], i));
  }
  sort(pairs.begin(), pairs.end());
  for (int i = 0; i <= N; ++i) {
    ans = max(ans, cook_k_times(i, Q, P));
  }
  cout << ans << endl;
}
