#include <bits/stdc++.h>
using namespace std;
int n, p, q, r, a[(100010)];
long long b[(100010)];
const int inf = 1e9;
int main() {
  scanf("%d%d%d%d", &n, &p, &q, &r);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    if (i == 1) {
      b[i] = 1ll * a[i] * p;
    } else {
      b[i] = max(b[i - 1], 1ll * a[i] * p);
    }
  }
  for (int i = n; i; --i) {
    b[i] = b[i] + 1ll * q * a[i];
  }
  for (int i = 2; i <= n; ++i) {
    b[i] = max(b[i - 1], b[i]);
  }
  for (int i = n; i; --i) {
    b[i] = b[i] + 1ll * r * a[i];
  }
  for (int i = 2; i <= n; ++i) {
    b[i] = max(b[i - 1], b[i]);
  }
  printf("%I64d\n", b[n]);
}
