#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long dp0[n], dp1[n], dp[n];
  dp0[0] = a[0] * p;
  for (long long i = 1; i < n; i++) {
    dp0[i] = max(dp0[i - 1], a[i] * p);
  }
  dp1[0] = a[0] * p + a[0] * q;
  for (long long i = 1; i < n; i++) {
    dp1[i] = max(dp1[i - 1], dp0[i] + a[i] * q);
  }
  dp[0] = a[0] * p + a[0] * q + a[0] * r;
  for (long long i = 1; i < n; i++) {
    dp[i] = max(dp[i - 1], dp1[i] + a[i] * r);
  }
  cout << dp[n - 1] << '\n';
  return 0;
}
