#include <bits/stdc++.h>
using namespace std;
const long long int inf = LLONG_MAX;
void solve() {
  long long int n, r1, r2, r3, traveltime;
  cin >> n >> r1 >> r2 >> r3 >> traveltime;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int dp[n + 1];
  dp[0] = 0;
  for (int i = 1; i <= n; ++i) {
    long long int best = inf;
    best = min(best, a[i - 1] * r1 + r3 + dp[i - 1] + traveltime);
    best = min(best, r2 + 3 * traveltime + r1 + dp[i - 1]);
    best = min(best, a[i - 1] * r1 + 2 * r1 + 3 * traveltime + dp[i - 1]);
    if (i > 1) {
      best =
          min(best, dp[i - 2] + min((a[i - 2] + 1) * r1, r2) +
                        min((a[i - 1] + 1) * r1, r2) + 2 * r1 + 4 * traveltime);
      long long int b = min((a[i - 2] + 1) * r1, r2) + a[i - 1] * r1 + r3 + r1 +
                        4 * traveltime;
      if (i == n) b -= traveltime;
      best = min(best, dp[i - 2] + b);
    }
    dp[i] = best;
  }
  cout << dp[n] - traveltime << "\n";
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
