#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1E6 + 5;
long long n, d, r1, r2, r3, a[MAXN], dp[MAXN][2];
template <class T>
void read(T& x, T f = 1, char ch = getchar()) {
  x = 0;
  while (ch < '0' || ch > '9') f = (ch == '-' ? -1 : 1), ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
  x *= f;
}
signed main() {
  read(n), read(r1), read(r2), read(r3), read(d);
  for (int i = 1; i <= n; i++) read(a[i]);
  dp[1][0] = min(a[1] * r1 + r1, r2), dp[1][1] = a[1] * r1 + r3;
  for (int i = 2; i <= n; i++) {
    dp[i][0] = min(dp[i - 1][0] + 3 * d + min(a[i] * r1 + r1, r2) + r1,
                   dp[i - 1][1] + d + min(a[i] * r1 + r1, r2));
    dp[i][1] = min(dp[i - 1][1] + d + a[i] * r1 + r3,
                   dp[i - 1][0] + 3 * d + min(a[i] * r1 + r1, r2) + 2 * r1);
  }
  cout << min(dp[n][1], dp[n - 1][0] + 2 * d + a[n] * r1 + r3 + r1) << endl;
  return 0;
}
