#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, q, r;
  cin >> n >> p >> q >> r;
  int ar[n];
  for (int i = 0; i < n; i++) cin >> ar[i];
  long long mxr[n];
  mxr[n - 1] = ((long long)r) * ar[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    long long res = ((long long)r) * ar[i];
    if (res > mxr[i + 1]) {
      mxr[i] = res;
    } else {
      mxr[i] = mxr[i + 1];
    }
  }
  long long mx = ((long long)p) * ar[0];
  long long ans = LLONG_MIN;
  for (int i = 0; i < n; i++) {
    long long cr = ((long long)p) * ar[i];
    if (cr > mx) mx = cr;
    long long res = mx + ((long long)q) * ar[i] + mxr[i];
    if (res > ans) ans = res;
  }
  cout << ans << endl;
}
