#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 1e5 + 1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  vector<long long> a(n);
  vector<vector<long long>> dp(3, vector<long long>(n));
  for (long long &i : a) cin >> i;
  dp[0][0] = p * a[0];
  dp[1][0] = dp[0][0] + q * a[0];
  dp[2][0] = dp[1][0] + r * a[0];
  for (long long i = 1; i < n; i++) {
    dp[0][i] = max(dp[0][i - 1], p * a[i]);
    dp[1][i] = max(dp[1][i - 1], dp[0][i] + q * a[i]);
    dp[2][i] = max(dp[2][i - 1], dp[1][i] + r * a[i]);
  }
  cout << dp[2][n - 1];
}
