#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, p, q, r;
  cin >> n >> p >> q >> r;
  vector<long long int> dp(n + 1, INTMAX_MIN);
  vector<long long int> dp1(n + 1, INTMAX_MIN);
  vector<long long int> dp2(n + 2, INTMAX_MIN);
  dp[0] = INTMAX_MIN;
  dp1[0] = INTMAX_MIN;
  dp2[0] = INTMAX_MIN;
  long long int arr[n + 1];
  for (long long int i = 1; i <= (n); i++) {
    cin >> arr[i];
  }
  for (long long int i = 1; i <= (n); i++) {
    dp[i] = max(dp[i - 1], arr[i] * p);
    dp1[i] = max(dp1[i - 1], dp[i] + arr[i] * q);
    dp2[i] = max(dp2[i - 1], dp1[i] + arr[i] * r);
  }
  cout << dp2[n] << "\n";
  return 0;
}
