#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const long long inf = 3e18;
const int N = 1e5 + 5;
int n;
long long v[N], a[N];
long long dp[5][N];
bool vis[5][N];
long long go(int i, int j) {
  if (i >= 3) return 0;
  if (j >= n) return -inf;
  if (vis[i][j] == 1) return dp[i][j];
  vis[i][j] = 1;
  long long L = go(i + 1, j) + v[i] * a[j];
  long long R = go(i, j + 1);
  return dp[i][j] = max(L, R);
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin >> n;
  cin >> v[0] >> v[1] >> v[2];
  for (int i = 0; i < n; i++) cin >> a[i];
  cout << go(0, 0) << endl;
  return 0;
}
