#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
const long long inf = 4e18;
const int infi = 2e9;
long long i, j, n, m, k, qq = 1, fr, to, w, x, y, mod = 998244353;
char ch;
long long r1, r2, r3, d;
vector<long long> a;
bool chmin(long long &a, long long b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> r1 >> r2 >> r3 >> d;
  a.resize(n);
  for (auto &x : a) cin >> x;
  vector<vector<long long> > dp(n, vector<long long>(2, inf));
  dp[0][0] = a[0] * r1 + r3;
  dp[0][1] = min(r2, a[i] * r1 + r1);
  for (long long i = 0; i < n - 1; i++) {
    chmin(dp[i + 1][0], dp[i][0] + a[i + 1] * r1 + r3 + d);
    chmin(dp[i + 1][0], dp[i][1] + d + a[i + 1] * r1 + r1 + d + r1 + d + r1);
    chmin(dp[i + 1][0], dp[i][1] + d + a[i + 1] * r1 + r3 + d + r1 + d);
    chmin(dp[i + 1][0], dp[i][1] + d + r2 + d + r1 + d + r1);
    chmin(dp[i + 1][1], dp[i][0] + d + min(r2, a[i + 1] * r1 + r1));
    chmin(dp[i + 1][1], dp[i][1] + d + a[i + 1] * r1 + r1 + d + r1 + d);
    chmin(dp[i + 1][1], dp[i][1] + d + r2 + d + r1 + d);
    if (i == n - 2) {
      chmin(dp[i + 1][0], dp[i][1] + d + a[i + 1] * r1 + r3 + d + r1);
    }
  }
  cout << dp[n - 1][0] << '\n';
}
