#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, q, r;
  cin >> n;
  cin >> p;
  cin >> q;
  cin >> r;
  long long int arr1[n];
  long long int prefixmax[n];
  long long int suffixmax[n];
  for (int i = 0; i < n; i++) {
    cin >> arr1[i];
  }
  if (p == 0) {
    for (int i = 0; i < n; i++) {
      prefixmax[i] = 0;
    }
  } else {
    prefixmax[0] = arr1[0];
    for (int i = 1; i < n; i++) {
      prefixmax[i] = max(p * prefixmax[i - 1], p * arr1[i]) / p;
    }
  }
  if (r == 0) {
    for (int i = 0; i < n; i++) {
      suffixmax[i] = 0;
    }
  } else {
    suffixmax[n - 1] = arr1[n - 1];
    for (int i = n - 2; i >= 0; i--) {
      suffixmax[i] = max(r * suffixmax[i + 1], r * arr1[i]) / r;
    }
  }
  long long int sum = (p * prefixmax[0]) + (q * arr1[0]) + (r * suffixmax[0]);
  for (int i = 0; i < n; i++) {
    sum = max(sum, ((p * prefixmax[i]) + (q * arr1[i]) + (r * suffixmax[i])));
  }
  cout << sum;
}
