#include <bits/stdc++.h>
using namespace std;
long long MOD = pow(10, 9) + 7;
long long INF = 1ll << 60;
int main() {
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  long long a[n + 1];
  for (long long i = 1; i < n + 1; i++) cin >> a[i];
  long long dp[n + 1];
  for (long long i = 0; i < n + 1; i++) dp[i] = -9000000000000000000;
  for (long long i = 1; i < n + 1; i++) dp[i] = max(dp[i - 1], p * a[i]);
  for (long long j = 1; j < n + 1; j++)
    dp[j] = max(dp[j - 1], dp[j] + q * a[j]);
  for (long long k = 1; k < n + 1; k++)
    dp[k] = max(dp[k - 1], dp[k] + r * a[k]);
  cout << dp[n] << endl;
}
