#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, p, q, r;
  cin >> n >> p >> q >> r;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long int res = LLONG_MIN;
  long long int prefixMax[n], suffixMax[n];
  prefixMax[0] = p * arr[0];
  for (long long int i = 1; i < n; i++) {
    prefixMax[i] = max(prefixMax[i - 1], p * arr[i]);
  }
  suffixMax[n - 1] = r * arr[n - 1];
  for (long long int j = n - 2; j >= 0; j--) {
    suffixMax[j] = max(suffixMax[j + 1], r * arr[j]);
  }
  for (long long int i = 0; i < n; i++) {
    long long int x = prefixMax[i] + q * arr[i] + suffixMax[i];
    res = max(res, x);
  }
  cout << res << endl;
}
