#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9;
const long long LNF = 1e18;
void setIO(string s) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
const int N = 1e5 + 7;
long long dp[N][3]{{-3 * LNF, -3 * LNF, -3 * LNF}};
int main() {
  setIO("input");
  int n;
  cin >> n;
  long long p, q, r;
  cin >> p >> q >> r;
  for (int i = 1; i <= n; ++i) {
    long long in;
    cin >> in;
    dp[i][0] = max(dp[i - 1][0], p * in);
    dp[i][1] = max(dp[i - 1][1], dp[i][0] + q * in);
    dp[i][2] = max(dp[i - 1][2], dp[i][1] + r * in);
  }
  cout << dp[n][2];
}
