#include <bits/stdc++.h>
using namespace std;
long long inf = (1e9) + 7;
long long n, p, r, q;
long long tabela[100005][3];
vector<long long> v;
long long dp(int index, int qual) {
  if (qual == 3) return 0;
  if (index == n) return -inf * inf * 3 - (100);
  if (tabela[index][qual] != -inf * inf * 4) return tabela[index][qual];
  long long aux = -inf * inf * 3 - 100;
  if (qual == 0) {
    aux = max(aux, dp(index + 1, qual));
    aux = max(aux, p * v[index] + dp(index, qual + 1));
  }
  if (qual == 1) {
    aux = max(aux, dp(index + 1, qual));
    aux = max(aux, q * v[index] + dp(index, qual + 1));
  }
  if (qual == 2) {
    aux = max(aux, dp(index + 1, qual));
    aux = max(aux, r * v[index] + dp(index, qual + 1));
  }
  tabela[index][qual] = aux;
  return aux;
}
int main() {
  for (int i = 0; i < 100005; ++i) {
    for (int j = 0; j < 3; ++j) {
      tabela[i][j] = -inf * inf * 4;
    }
  }
  cin >> n >> p >> q >> r;
  long long aux;
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &aux);
    v.push_back(aux);
  }
  printf("%lld\n", dp(0, 0));
}
