#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int n;
long long v[3], d, a[N + 9], dp[N + 9];
void work() {
  scanf("%d%lld%lld%lld%lld", &n, &v[0], &v[1], &v[2], &d);
  for (int i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  dp[0] = -d;
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1] + d + min(a[i] * v[0] + v[2], v[1] + d * 2 + v[0]);
    if (i >= 2) {
      long long now = dp[i - 2];
      now += d + min(v[1], (a[i - 1] + 1) * v[0]);
      now += d + min(v[1], (a[i] + 1) * v[0]);
      now += d + v[0];
      now += d + v[0];
      dp[i] = min(dp[i], now);
    }
  }
  long long ans = dp[n], now = dp[n - 2];
  now += d + min(v[1], (a[n - 1] + 1) * v[0]);
  now += d + a[n] * v[0] + v[2];
  now += d + v[0];
  ans = min(ans, now);
  now =
      d + min(a[n] * v[0] + v[2], min(v[1], v[0] * (a[n] + 1)) + d * 2 + v[0]);
  for (int i = n - 1; i >= 0; --i) {
    ans = min(ans, dp[i] + now);
    now += d * 2 + min((a[i] + 1) * v[0], v[1]) + v[0];
  }
  printf("%lld\n", ans);
}
int main() {
  int T = 1;
  for (; T--;) work();
  return 0;
}
