#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
const int maxn = 1e6 + 10;
const int mod = 1e9 + 7;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int n;
ll d, arr[maxn], pistol, laser, awp, dp[maxn][2];
ll calc1(int i) {
  ll tim = min(pistol, awp) * arr[i];
  tim += awp;
  return tim;
}
ll calc2(int i) {
  ll tim1 = laser + min({pistol, awp, laser});
  ll tim2 = min(pistol, awp) * arr[i];
  tim2 += min({pistol * 2, pistol + laser, laser * 2});
  return min(tim1, tim2);
}
ll solve(int i, int go_back) {
  ll &ret = dp[i][go_back];
  if (ret != -1) {
    return ret;
  }
  if (i == n + 1) {
    if (go_back) {
      return ret = d * 2;
    } else {
      return ret = 0;
    }
  }
  ret = (ll)1e18;
  if (go_back) {
    ll time1 = calc1(i);
    if (i == n) {
      ret = min(ret, time1 + d + solve(i + 1, 0));
    } else {
      ret = min(ret, time1 + d * 2 + solve(i + 1, 0));
    }
    ll time2 = calc2(i);
    ret = min(ret, time2 + d * 2 + solve(i + 1, 0));
  } else {
    ll time1 = calc1(i);
    ret = min(ret, time1 + solve(i + 1, 0));
    ll time2 = calc2(i);
    ret = min(ret, time2 + solve(i + 1, 1));
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  cin >> n >> pistol >> laser >> awp >> d;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  memset(dp, -1, sizeof dp);
  cout << d * (n - 1) + solve(1, 0) << "\n";
  return 0;
}
