#include <bits/stdc++.h>
using namespace std;
const int MAXN = 180;
const int MAXK = 80;
void solve() {
  int n;
  cin >> n;
  long long p, q, r;
  cin >> p >> q >> r;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  vector<long long> dp1(n);
  for (int i = 0; i < n; ++i) dp1[i] = a[i] * p;
  vector<long long> dp2(n);
  long long prevDpMax = -1e19;
  for (int j = 0; j < n; ++j) {
    prevDpMax = max(prevDpMax, dp1[j]);
    dp2[j] = prevDpMax + a[j] * q;
  }
  vector<long long> dp3(n);
  prevDpMax = -1e19;
  for (int k = 0; k < n; ++k) {
    prevDpMax = max(prevDpMax, dp2[k]);
    dp3[k] = prevDpMax + a[k] * r;
  }
  long long ans = -1e19;
  for (int i = 0; i < n; ++i) ans = max(ans, dp3[i]);
  cout << ans << endl;
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  solve();
  return 0;
}
