#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
const long long MOD = 998244353;
const long long MAX = 1e6 + 1;
inline long long add(long long a, long long b) {
  return ((a % mod) + (b % mod)) % mod;
}
inline long long sub(long long a, long long b) {
  return ((a % mod) - (b % mod) + mod) % mod;
}
inline long long mul(long long a, long long b) {
  return ((a % mod) * (b % mod)) % mod;
}
long long pwr(long long x, long long n) {
  if (n == 0) {
    return 1;
  }
  if (n & 1) {
    return mul(x, pwr(mul(x, x), (n - 1) / 2));
  } else {
    return pwr(mul(x, x), n / 2);
  }
}
long long modInv(long long n) { return pwr(n, mod - 2); }
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long n, d, r1, r2, r3, a[MAX], dp[MAX][2];
long long rec(long long i, long long done) {
  if (i == n) {
    return 0;
  } else if (i == n - 1) {
    if (done) {
      return dp[i][done] = min({(a[i] + 1) * r1 + 2 * d + r1, a[i] * r1 + r3,
                                r2 + 2 * d + r1});
    } else {
      return dp[i][done] = min({(a[i] + 1) * r1 + 2 * d + r1 + r1,
                                a[i] * r1 + r3 + d + r1, r2 + 2 * d + r1 + r1});
    }
  }
  if (dp[i][done] != -1) {
    return dp[i][done];
  }
  long long ans = inf;
  if (done) {
    long long moves11 = (a[i] + 1) * r1 + rec(i + 1, 0);
    long long moves13 = a[i] * r1 + r3 + rec(i + 1, 1);
    long long moves2 = r2 + rec(i + 1, 0);
    ans = min({moves11, moves13, moves2});
  } else {
    long long prevBoss = 2 * d + r1;
    long long curBoss = r1;
    long long moves11 = (a[i] + 1) * r1 + rec(i + 1, 1) + prevBoss + curBoss;
    long long moves13 = a[i] * r1 + r3 + rec(i + 1, 1) + prevBoss;
    long long moves2 = r2 + rec(i + 1, 1) + prevBoss + curBoss;
    ans = min({moves11, moves13, moves2});
  }
  return dp[i][done] = ans;
}
void speed_solve() {
  cin >> n >> r1 >> r2 >> r3 >> d;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  memset(dp, -1, sizeof(dp));
  cout << rec(0, 1) + (n - 1) * d << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long test_cases = 1;
  for (long long i = 0; i < test_cases; i++) {
    speed_solve();
  }
  return 0;
}
