#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 9;
const double ep = 1e-7;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double pi = acos(-1);
int n;
long long r1, r2, r3, d;
long long a[maxn];
long long dp[maxn][2];
void solve() {
  scanf("%d", &(n));
  scanf("%lld%lld%lld%lld", &r1, &r2, &r3, &d);
  for (register int i = (1); i <= (n); ++i) scanf("%lld", &(a[i]));
  long long sum1 = r1 * a[1] + r3;
  long long sum2 = min(r1 * a[1] + r1, r2);
  dp[1][0] = sum1;
  dp[1][1] = sum2 + d * 2 + r1;
  dp[1][0] = min(dp[1][0], dp[1][1]);
  for (register int i = (2); i <= (n - 1); ++i) {
    sum1 = r1 * a[i] + r3;
    sum2 = min(r1 * a[i] + r1, r2);
    dp[i][0] = min(dp[i - 1][0] + sum1 + d, dp[i - 1][1] + sum2 + r1 + d);
    dp[i][1] = dp[i - 1][0] + sum2 + d + r1 + d * 2;
    dp[i][0] = min(dp[i][0], dp[i][1]);
  }
  sum1 = r1 * a[n] + r3;
  sum2 = min(r1 * a[n] + r1, r2);
  long long ans = min(sum1 + dp[n - 1][0] + d, sum1 + dp[n - 1][1]);
  ans = min(ans, sum2 + dp[n - 1][0] + r1 + d * 2 + d);
  ans = min(ans, sum2 + dp[n - 1][1] + r1 + d);
  printf("%lld\n", (ans));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int T = 1;
  while (T--) solve();
}
