#include <bits/stdc++.h>
using namespace std;
long long int fastpow(long long int base, long long int exp, long long int M) {
  long long int res = 1;
  while (exp > 0) {
    if (exp & 1) res = (res * base) % M;
    base = (base * base) % M;
    exp >>= 1;
  }
  return res;
}
void self_min(long long int &a, long long int b) { a = (a < b) ? a : b; }
void solve() {
  long long int n;
  cin >> n;
  long long int r1, r2, r3;
  cin >> r1 >> r2 >> r3;
  long long int d;
  cin >> d;
  long long int a[n];
  for (long long int i = 0; i <= n - 1; ++i) {
    cin >> a[i];
  }
  vector<vector<long long int> > dp(n, vector<long long int>(2, 1e18));
  dp[0][0] = r1 * a[0] + r3;
  dp[0][1] = min(r2, r1 * a[0] + r1);
  for (long long int i = 0; i <= n - 2; ++i) {
    self_min(dp[i + 1][0], dp[i][0] + d + r1 * a[i + 1] + r3);
    self_min(dp[i + 1][1], dp[i][0] + d + min(r2, r1 * a[i + 1] + r1));
    self_min(dp[i + 1][0], dp[i][1] + d + r1 * a[i + 1] + r3 + 2 * d + r1);
    self_min(dp[i + 1][0], dp[i][1] + d + r1 * a[i + 1] + r1 + 2 * d + 2 * r1);
    self_min(dp[i + 1][0], dp[i][1] + d + r2 + 2 * d + 2 * r1);
    self_min(dp[i + 1][1], dp[i][1] + d + r2 + d + r1 + d);
    self_min(dp[i + 1][1], dp[i][1] + d + r1 * a[i + 1] + r1 + d + r1 + d);
    if (i == n - 2) {
      self_min(dp[i + 1][0], dp[i][1] + d + r1 * a[i + 1] + r3 + d + r1);
    }
  }
  cout << dp[n - 1][0];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
