#include <bits/stdc++.h>
using namespace std;
int read() {
  int w = 0, flg = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') flg = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') {
    w = w * 10 - '0' + ch, ch = getchar();
  }
  return w * flg;
}
int n;
long long r1, r2, r3, d, a[1000010], dp[1000010][2];
int main() {
  n = read(), r1 = read(), r2 = read(), r3 = read(), d = read();
  for (int i = (1); i <= (n); i++) a[i] = read();
  dp[1][0] = r1 * a[1] + r3;
  dp[1][1] = min(r1 * (a[1] + 1), r2);
  for (int i = (2); i <= (n); i++) {
    long long p1 = r1 * a[i] + r3, p2 = min(r1 * (a[i] + 1), r2);
    dp[i][0] = dp[i - 1][0] + d + p1;
    dp[i][0] = min(dp[i][0], dp[i - 1][1] + d + p1 + d + r1 + d);
    dp[i][0] = min(dp[i][0], dp[i - 1][1] + d + p2 + d + r1 + d + r1);
    dp[i][1] = dp[i - 1][0] + d + p2;
    dp[i][1] = min(dp[i][1], dp[i - 1][1] + d + p2 + d + r1 + d);
  }
  long long p1 = r1 * a[n] + r3, p2 = min(r1 * (a[n] + 1), r2);
  long long ans = dp[n][0];
  ans = min(ans, dp[n - 1][1] + d + p1 + d + r1);
  ans = min(ans, dp[n - 1][0] + d + p2 + d + d + r1);
  printf("%lld\n", ans);
  return 0;
}
