#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long arr[maxn], kiri[maxn], kanan[maxn];
long long n, a, b, c;
int main() {
  cin >> n >> a >> b >> c;
  for (int x = 1; x <= n; x++) cin >> arr[x];
  for (int x = 1; x <= n; x++) {
    kiri[x] = max(kiri[x - 1], arr[x] * a);
    if (x == 1) kiri[x] = arr[x] * a;
  }
  for (int x = n; x >= 1; x--) {
    kanan[x] = max(kanan[x + 1], arr[x] * c);
    if (x == n) kanan[x] = arr[x] * c;
  }
  long long ans = -4000000000000000000;
  for (int x = 1; x <= n; x++) {
    ans = max(ans, kiri[x] + arr[x] * b + kanan[x]);
  }
  cout << ans;
  printf("\n");
}
