#include <bits/stdc++.h>
#pragma GCC optimize("O2")
const int inf = 0x3fffffff;
const int maxn = 2017;
const int mod = 1000000007;
using namespace std;
inline int read() {
  int f = 1, x = 0;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return f * x;
}
long long a[5000001];
long long dp[5000001][5];
int main() {
  memset(dp, 128, sizeof(dp));
  int n = read(), p = read(), q = read(), r = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
  }
  for (int i = 1; i <= n; i++) {
    dp[i][0] = max(dp[i - 1][0], p * a[i]);
    dp[i][1] = max(dp[i - 1][1], dp[i][0] + q * a[i]);
    dp[i][2] = max(dp[i - 1][2], dp[i][1] + r * a[i]);
  }
  cout << dp[n][2];
}
