#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, p, q, r;
  cin >> n >> p >> q >> r;
  vector<long long int> a(n);
  vector<vector<long long int> > dp(3, vector<long long int>(n));
  for (int i = 0; i < n; i++) cin >> a[i];
  dp[0][0] = p * a[0];
  dp[1][0] = (p + q) * a[0];
  dp[2][0] = (p + q + r) * a[0];
  for (int i = 1; i < n; i++) {
    dp[0][i] = max(dp[0][i - 1], p * a[i]);
    dp[1][i] =
        max(dp[1][i - 1], max(dp[0][i - 1] + q * a[i], p * a[i] + q * a[i]));
    dp[2][i] = max(dp[2][i - 1], max(dp[1][i - 1] + r * a[i],
                                     max(dp[0][i - 1] + q * a[i] + r * a[i],
                                         p * a[i] + q * a[i] + r * a[i])));
  }
  cout << dp[2][n - 1] << endl;
}
