#include <bits/stdc++.h>
using namespace std;
const long long sz = 1e6 + 10;
long long n, r1, r2, r3, d, mon[sz];
int main() {
  cin >> n >> r1 >> r2 >> r3 >> d;
  for (long long i = 1; i <= n; ++i) scanf("%lld", &mon[i]);
  long long full = 0, lastBossExtra = (1LL << 61);
  for (long long i = 1; i <= n; ++i) {
    long long nowFull = r1 * mon[i] + r3;
    long long bossExtra = min(r1 * mon[i] + 2 * r1, r2 + r1);
    long long opt1 = full + nowFull;
    opt1 = min(opt1, lastBossExtra + 2 * d + bossExtra);
    if (i != n)
      opt1 = min(opt1, lastBossExtra + 2 * d + nowFull);
    else
      opt1 = min(opt1, lastBossExtra + d + nowFull);
    long long opt2 = full + bossExtra;
    full = opt1, lastBossExtra = opt2;
  }
  cout << min(full, lastBossExtra + 2 * d) + d * (n - 1) << '\n';
  return 0;
}
