#include <bits/stdc++.h>
using namespace std;
long long n, m, l, r;
long long a[200005];
long long c[200005];
long long f[200005][4];
void rd() {
  cin >> n >> c[1] >> c[2] >> c[3];
  for (int i = 1; i <= n; i++) cin >> a[i];
}
int main() {
  rd();
  long long ans = 0;
  l = 1;
  r = n;
  swap(c[1], c[3]);
  memset(f, 0xc0, sizeof(f));
  for (int i = 1; i <= n + 1; i++) f[i][0] = 0;
  for (int j = 1; j <= 3; j++)
    for (int i = n; i >= 1; i--) {
      f[i][j] = max(f[i][j - 1] + c[j] * a[i], f[i + 1][j]);
    }
  cout << f[1][3];
  return 0;
}
