#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 5;
const long long int INF = 9e18;
const long long int mod = 1e9 + 7;
long long int n, p, q, r, a[N], dp[N][3];
int main() {
  cin >> n >> p >> q >> r;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  dp[0][0] = p * a[0];
  dp[0][1] = dp[0][0] + q * a[0];
  dp[0][2] = dp[0][1] + r * a[0];
  for (long long int i = 1; i < n; i++) {
    dp[i][0] = max(dp[i - 1][0], p * a[i]);
    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;
}
