#include <bits/stdc++.h>
using namespace std;
long long n, r1, r2, r3, d;
long long dp[1000010][2], a[1000010];
long long f(long long i, bool boss) {
  long long x = min(r1 * a[i] + r1, r2), y = r1 * a[i] + r3;
  if (i == n - 1) {
    if (!boss) return min(y, x + (d + r1 + d));
    return min(y + (d + r1), x + (d + r1 + d) + r1);
  }
  if (dp[i][boss] != -1) return dp[i][boss];
  long long ans = 0;
  if (!boss) {
    ans = y + d + f(i + 1, 0);
    ans = min(ans, x + d + f(i + 1, 1));
  } else {
    ans = y + (d + r1 + d) + d + f(i + 1, 0);
    ans = min(ans, x + (d + r1 + d) + d + r1 + f(i + 1, 0));
  }
  return dp[i][boss] = ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> r1 >> r2 >> r3 >> d;
  for (long long i = 0; i < n; ++i) cin >> a[i];
  memset(dp, -1, sizeof(dp));
  cout << f(0, 0);
  return 0;
}
