#include <bits/stdc++.h>
using namespace std;
long long a[100010] = {0}, ap[100010] = {0}, aq[100010] = {0}, ar[100010] = {0};
int main() {
  long long n, p, q, r;
  while (cin >> n >> p >> q >> r) {
    long long i;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
    }
    ap[0] = aq[0] = ar[0] = -3 * 1e18;
    for (i = 1; i <= n; i++) {
      ap[i] = max(ap[i - 1], a[i] * p);
      aq[i] = max(aq[i - 1], (a[i] * q) + ap[i]);
      ar[i] = max(ar[i - 1], (a[i] * r) + aq[i]);
    }
    cout << ar[n] << endl;
  }
}
