#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  long long x;
  long long a = -INFINITY, b = -INFINITY, c = -INFINITY;
  for (long long i = 1; i <= n; i++) {
    cin >> x;
    a = max(a, p * x);
    b = max(b, a + q * x);
    c = max(c, b + r * x);
  }
  cout << c << endl;
  return 0;
}
