#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int mod_ = 998244353;
const int INF = 1000000000;
const long long int INF64 = (long long int)1E18;
long long int n, p, q, r;
long long int dp0[100005], dp1[100005], dp2[100005];
vector<long long int> arr;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> p >> q >> r;
  arr.resize(n);
  long long int mini = INF64, maxi = -INF64;
  for (long long int& ele : arr) cin >> ele;
  dp0[0] = arr[0] * p;
  dp1[0] = dp0[0] + arr[0] * q;
  dp2[0] = dp1[0] + arr[0] * r;
  for (int i = 1; i < n; i++) dp0[i] = max(dp0[i - 1], arr[i] * p);
  for (int j = 1; j < n; j++) dp1[j] = max(dp1[j - 1], arr[j] * q + dp0[j]);
  for (int k = 1; k < n; k++) dp2[k] = max(dp2[k - 1], arr[k] * r + dp1[k]);
  cout << dp2[n - 1];
  return 0;
}
