#include <bits/stdc++.h>
using namespace std;
const long long int maxn = (1e5) + 1;
const long long int mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, x, y, z;
  cin >> n >> x >> y >> z;
  long long int dp[n][3];
  long long int i, j;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < 3; j++) {
      if (j == 0) {
        if (i == 0) {
          dp[i][j] = a[i] * x;
        } else {
          dp[i][j] = max(dp[i - 1][j], a[i] * x);
        }
      } else if (j == 1) {
        if (i == 0) {
          dp[i][j] = dp[i][0] + a[i] * y;
        } else {
          dp[i][j] = max(dp[i - 1][j], dp[i][0] + a[i] * y);
        }
      } else {
        if (i == 0) {
          dp[i][j] = dp[i][1] + a[i] * z;
        } else {
          dp[i][j] = max(dp[i - 1][j], dp[i][1] + a[i] * z);
        }
      }
    }
  }
  cout << dp[n - 1][2] << "\n";
  cerr << "\nTime elapsed:" << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
