#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const long long inf = 4e18;
const long long N = 1e5 + 10;
long long a[N], b[N], c[N], besta[N], bestc[N];
void solve() {
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  for (long long i = 0; i < n; i++) cin >> a[i + 1];
  besta[1] = a[1] * p;
  for (long long i = 2; i <= n; i++) {
    besta[i] = max(besta[i - 1], a[i] * p);
  }
  bestc[n] = a[n] * r;
  for (long long i = n - 1; i >= 1; i--) {
    bestc[i] = max(bestc[i + 1], a[i] * r);
  }
  long long ans = -inf;
  for (long long i = 1; i <= n; i++) {
    ans = max(ans, besta[i] + a[i] * q + bestc[i]);
  }
  cout << ans << endl;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
