#include <bits/stdc++.h>
using namespace std;
long long dp[1000005][2];
void solve(int tc) {
  long long n, r1, r2, r3, d;
  cin >> n >> r1 >> r2 >> r3 >> d;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  dp[0][0] = a[0] * r1 + r3;
  dp[0][1] = min(r2, (a[0] + 1) * r1);
  for (int i = 1; i < n; ++i) {
    long long zero = a[i] * r1 + r3;
    long long one = min(r2, (a[i] + 1) * r1);
    if (i < n - 1) {
      dp[i][1] = dp[i - 1][0] + d + one;
      dp[i][0] = d + min(dp[i - 1][0] + zero,
                         min(r1 + one, zero) + d + dp[i - 1][1] + r1 + d);
      dp[i][0] = min(dp[i][0], d + one + d + dp[i - 1][0] + d + r1);
    }
    if (i == n - 1) {
      dp[i][1] = dp[i - 1][0] + d + one;
      dp[i][0] = d + min(dp[i - 1][0] + zero,
                         min(r1 + one + d, zero) + d + dp[i - 1][1] + r1);
      dp[i][0] = min(dp[i][0], d + one + d + dp[i - 1][0] + d + r1);
    }
  }
  cout << dp[n - 1][0] << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  for (int tc = 1; tc <= t; ++tc) {
    solve(tc);
  }
  return 0;
}
