#include <bits/stdc++.h>
using namespace std;
long long a[1000000], dp0[1000000], dp1[1000000], dp2[1000000];
int main() {
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  for (int i = 0; i < n; i++) cin >> a[i];
  dp0[0] = a[0] * p;
  for (int i = 1; i < n; i++) {
    dp0[i] = max(dp0[i - 1], a[i] * p);
  }
  dp1[0] = dp0[0] + a[0] * q;
  for (int i = 1; i < n; i++) {
    dp1[i] = max(dp1[i - 1], dp0[i] + q * a[i]);
  }
  dp2[0] = dp1[0] + a[0] * r;
  for (int i = 1; i < n; i++) {
    dp2[i] = max(dp2[i - 1], dp1[i] + a[i] * r);
  }
  cout << dp2[n - 1];
  return 0;
}
