#include <bits/stdc++.h>
using namespace std;
long long n, p, q, r;
vector<long long> v;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> p >> q >> r;
  long long x1, x2, x3;
  x1 = x2 = x3 = -4e18;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    x1 = max(x1, x * p);
    x2 = max(x2, x1 + x * q);
    x3 = max(x3, x2 + x * r);
  }
  cout << x3 << endl;
  return 0;
}
