#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t, i, j;
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  long long arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  long long mini[n];
  mini[n - 1] = arr[n - 1];
  for (i = n - 2; i >= 0; i--) {
    mini[i] = min(mini[i + 1], arr[i]);
  }
  long long maxi[n];
  maxi[n - 1] = arr[n - 1];
  for (i = n - 2; i >= 0; i--) {
    maxi[i] = max(maxi[i + 1], arr[i]);
  }
  long long dp1[n];
  dp1[n - 1] = (q + r) * arr[n - 1];
  for (i = n - 2; i >= 0; i--) {
    dp1[i] = max(dp1[i + 1], q * arr[i] + r * mini[i]);
    dp1[i] = max(dp1[i], q * arr[i] + r * maxi[i]);
  }
  long long dp2[n];
  dp2[n - 1] = (p + q + r) * arr[n - 1];
  for (i = n - 2; i >= 0; i--) {
    dp2[i] = max(dp2[i + 1], p * arr[i] + dp1[i]);
  }
  cout << dp2[0];
}
