#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,inline,unroll-loops,no-stack-protector")
using namespace std;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<long long>> dp(n, vector<long long>(3));
  dp[0][0] = a[0] * p;
  dp[0][1] = dp[0][0] + q * a[0];
  dp[0][2] = dp[0][1] + r * a[0];
  for (int i = 1; i < n; i++) {
    dp[i][0] = max(dp[i - 1][0], (long long)a[i] * p);
    dp[i][1] = max(dp[i - 1][1], dp[i][0] + q * a[i]);
    dp[i][2] = max(dp[i - 1][2], dp[i][1] + r * a[i]);
  }
  cout << dp[n - 1][2] << endl;
}
