#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const ll inf = 8e18;
ll n;
ll r1, r2, r3, d;
vector<ll> a;
vector<vector<ll> > dp;
ll rec(ll i, ll state) {
  assert(i >= 0);
  if (i == n) return -d;
  if (i == n - 1 && state == 4) return -d;
  if (dp[i][state] != inf) return dp[i][state];
  ll ans1 = inf, ans2 = inf, ans3 = inf;
  if (state == 0) {
    ans1 = a[i] * r1 + r3 + d + rec(i + 1, 0);
    if (i + 1 != n)
      ans2 = r2 + d + rec(i + 1, 1);
    else
      ans2 = r2 + d + d + r1;
    if (i + 1 != n)
      ans3 = a[i] * r1 + r1 + d + rec(i + 1, 1);
    else
      ans3 = a[i] * r1 + r1 + d + d + r1;
  } else if (state == 1) {
    ans1 = a[i] * r1 + r3 + d + rec(i - 1, 2);
    ans2 = r2 + d + rec(i - 1, 3);
    ans3 = a[i] * r1 + r1 + d + rec(i - 1, 3);
  } else if (state == 2) {
    ans1 = r1 + d + rec(i + 1, 4);
  } else if (state == 3) {
    ans1 = r1 + d + rec(i + 1, 5);
  } else if (state == 4) {
    ans1 = d + rec(i + 1, 0);
  } else if (state == 5) {
    ans1 = r1 + d + rec(i + 1, 0);
  }
  return dp[i][state] = min(ans1, min(ans2, ans3));
}
void solve() {
  cin >> n;
  cin >> r1 >> r2 >> r3;
  cin >> d;
  a.resize(n);
  for (ll i = 0; i < n; i++) {
    cin >> a[i];
  }
  dp = vector<vector<ll> >(n, vector<ll>(6, inf));
  cout << rec(0, 0) << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1, p;
  for (p = 1; p <= t; p++) {
    solve();
  }
  return 0;
}
