#include <bits/stdc++.h>
using namespace std;
long long int solve(vector<int> &C, int p, int q, int d) {
  int n = C.size();
  if (d == n) return 0;
  if (C[d] < p * q) {
    return p * q + solve(C, p, q + 1, d + 1);
  } else {
    return max(C[d] + solve(C, p, q - 1, d + 1),
               p * q + solve(C, p, q + 1, d + 1));
  }
}
int main() {
  int n, p, q;
  cin >> n >> p >> q;
  vector<int> C(n);
  for (int i = 0; i < n; ++i) cin >> C[i];
  cout << solve(C, p, q, 0) << endl;
  return 0;
}
