#include <bits/stdc++.h>
using namespace std;
long long a[100001];
long long pa[100001];
long long ra[100001];
int main() {
  long long n, i, j, k, l, p, q, r;
  scanf("%lld%lld%lld%lld", &n, &p, &q, &r);
  long long mx = -10e18;
  for (i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    if (i == 0)
      pa[i] = p * a[i];
    else
      pa[i] = max(pa[i - 1], a[i] * p);
  }
  for (i = n - 1; i >= 0; i--) {
    if (i == n - 1)
      ra[i] = r * a[i];
    else
      ra[i] = max(ra[i + 1], r * a[i]);
  }
  for (i = 0; i < n; i++) mx = max(pa[i] + ra[i] + q * a[i], mx);
  cout << mx;
}
