#include <bits/stdc++.h>
using namespace std;
long long num[100005];
long long dp[100005];
int main() {
  int n;
  long long p, q, r;
  long long INF = 8e18;
  dp[0] = -INF;
  long long now, res = -INF;
  cin >> n >> p >> q >> r;
  for (int i = 1; i <= n; ++i) cin >> num[i];
  for (int i = 1; i <= n; ++i) {
    now = p * num[i];
    dp[i] = max(dp[i - 1], now);
  }
  for (int i = 1; i <= n; ++i) {
    now = q * num[i];
    dp[i] = max(dp[i - 1], dp[i] + now);
  }
  for (int i = 1; i <= n; ++i) {
    now = r * num[i];
    dp[i] = max(dp[i - 1], dp[i] + now);
    res = max(res, dp[i]);
  }
  cout << res << endl;
  return 0;
}
