#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    long long t = bigmod(p, e / 2, M);
    return (T)((t * t) % M);
  }
  return (T)(((long long)bigmod(p, e - 1, M) * (long long)(p)) % M);
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
long long ar[100001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, c, d, e, f, g, h = 0, x = (1ll << 62) - 1, y, z;
  cin >> a >> b >> c >> d >> e;
  for (int i = (0); i < (a); ++i) cin >> ar[i + 1];
  for (int i = 1; i <= a; i++) ar[i] += ar[i - 1];
  for (int i = 0; i <= a; i++) {
    f = i;
    g = a - i;
    h = min(f, g);
    y = ar[i] * b + (ar[a] - ar[i]) * c;
    y += (f - h) * d + (g - h) * e;
    if (f > h)
      y -= d;
    else if (g > h)
      y -= e;
    x = min(x, y);
  }
  cout << x << endl;
}
