#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int i, j;
  long long int n, p, q, r;
  cin >> n >> p >> q >> r;
  long long int a[n + 5];
  for (i = 1; i <= n; i++) cin >> a[i];
  long long int dp[n + 5][5];
  memset(dp, 0, sizeof dp);
  dp[1][1] = p * a[1];
  dp[1][2] = p * a[1] + q * a[1];
  dp[1][3] = p * a[1] + q * a[1] + r * a[1];
  for (i = 2; i <= n; i++) {
    dp[i][1] = max(dp[i - 1][1], p * a[i]);
    dp[i][2] = max(dp[i - 1][1] + q * a[i], dp[i - 1][2]);
    dp[i][2] = max(dp[i][2], p * a[i] + q * a[i]);
    dp[i][3] = max(dp[i - 1][0] + (p + q + r) * a[i], dp[i - 1][3]);
    dp[i][3] = max(dp[i - 1][1] + (q + r) * a[i], dp[i][3]);
    dp[i][3] = max(dp[i - 1][2] + r * a[i], dp[i][3]);
  }
  cout << dp[n][3] << "\n";
  return 0;
}
