#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, p, q, r;
  cin >> n >> p >> q >> r;
  vector<long long int> v(n);
  for (long i = 0; i < n; i++) {
    cin >> v[i];
  };
  long long int s1 = LLONG_MIN, s2 = LLONG_MIN, s3 = LLONG_MIN;
  for (int i = 0; i < n; i++) {
    s1 = max(s1, (p * v[i]));
    s2 = max(s2, (s1 + (q * v[i])));
    s3 = max(s3, (s2 + (r * v[i])));
  }
  cout << s3 << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
