#include <bits/stdc++.h>
using namespace std;
const long long INF = 3e18 + 10, MAX = 2e5 + 1e4, MOD = 1e9 + 7, MAXL = 25;
void OUT(long double o, int x) {
  cout << fixed << setprecision(x) << o;
  return;
}
long long a[MAX], dp1[MAX], dp2[MAX], dp3[MAX];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    dp1[i] = -INF;
    dp2[i] = -INF;
    dp3[i] = -INF;
  }
  dp1[0] = a[0] * p;
  for (int i = 1; i < n; i++) dp1[i] = max(dp1[i - 1], a[i] * p);
  dp2[0] = dp1[0] + (a[0] * q);
  for (int i = 1; i < n; i++) dp2[i] = max(dp2[i - 1], (a[i] * q) + dp1[i]);
  dp3[0] = dp2[0] + (a[0] * r);
  for (int i = 1; i < n; i++) dp3[i] = max(dp3[i - 1], (a[i] * r) + dp2[i]);
  cout << dp3[n - 1];
  return 0;
}
