#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t, n, c1, c2, k1, k2, i, j, k, sum, ans, tmp;
  cin >> n >> c1 >> c2 >> k1 >> k2;
  long long int a[n + 1];
  a[n] = 0;
  sum = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  j = 0;
  for (i = 0; i <= n; i++) {
    tmp = j * c1 + (sum - j) * c2;
    k = n - i;
    t = i;
    if (k + 1 == t || k == t || k == t + 1)
      tmp += 0;
    else if (t < k)
      tmp += (k - t - 1) * k2;
    else
      tmp += (t - k - 1) * k1;
    ans = min(ans, tmp);
    j += a[i];
  }
  cout << ans << "\n";
  return 0;
}
