#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long int INF = (1LL << 50);
const int N = 1000005;
long long int dp[N][2], v[N];
int main() {
  long long int n, r1, r2, r3, d;
  scanf("%lld %lld %lld %lld %lld", &n, &r1, &r2, &r3, &d);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &v[i]);
    dp[i][0] = dp[i][1] = INF;
  }
  dp[0][0] = v[0] * r1 + r3 + d;
  dp[0][1] = min(r2 + r1, (v[0] + 2) * r1) + d;
  for (int i = 1; i < n; i++) {
    long long int cost = v[i] * r1 + r3;
    long long int cost2 = min(r2 + r1, (v[i] + 2) * r1);
    long long int transicao = (i < n - 1 ? d : 0);
    dp[i][0] = cost + transicao +
               min(dp[i - 1][0], dp[i - 1][1] + (i == n - 1 ? d : 2 * d));
    dp[i][0] = min(dp[i][0],
                   cost2 + transicao + min(dp[i - 1][1], dp[i - 1][0]) + 2 * d);
    dp[i][1] = cost2 + dp[i - 1][0] + transicao;
  }
  printf("%lld\n", dp[n - 1][0]);
  return 0;
}
