#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long mod = 1e9 + 7;
long long a[100005];
long long L[100005], R[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, p, q, r;
  cin >> n >> p >> q >> r;
  for (int i = 0; i < n; i++) cin >> a[i];
  L[0] = p * a[0];
  R[n - 1] = r * a[n - 1];
  for (int i = 1; i < n; i++) L[i] = max(L[i - 1], p * a[i]);
  for (int i = n - 2; i >= 0; --i) R[i] = max(R[i + 1], r * a[i]);
  long long ans = LONG_LONG_MIN;
  for (int i = 0; i < n; i++) {
    ans = max(ans, L[i] + R[i] + a[i] * q);
  }
  cout << ans << endl;
  return 0;
}
