#include <bits/stdc++.h>
using namespace std;
const int max_N = 1e5 + 10;
const long long inf = 3 * 1e18 + 10;
long long inp[max_N];
long long dp[max_N][3];
int main() {
  ios_base::sync_with_stdio(false);
  int N;
  long long p, q, r;
  cin >> N >> p >> q >> r;
  for (int i = 1; i <= N; ++i) {
    cin >> inp[i];
  }
  dp[N + 1][0] = -inf;
  dp[N + 1][1] = -inf;
  dp[N + 1][2] = -inf;
  for (int i = N; i >= 1; --i) {
    dp[i][0] = max(dp[i + 1][0], r * inp[i]);
    dp[i][1] = max(dp[i + 1][1], q * inp[i] + dp[i][0]);
    dp[i][2] = max(dp[i + 1][2], p * inp[i] + dp[i][1]);
  }
  cout << dp[1][2] << endl;
}
