#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAXN = 100010;
map<long long, long long> mp;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long i, j, u, n, m, w, t, x, x2, v, e, z, d, cnt, x1, y, gcc,
    tot = 0, a[1000005], f[1000005][3], ans, maxx, minn, flag, k;
string str;
long long cmp(long long a, long long b) { return a > b; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long r1, r2, r3;
  cin >> n >> r1 >> r2 >> r3 >> d;
  for (int i = 1; i <= n; i++) cin >> a[i];
  f[1][0] = r1 * a[1] + r3;
  f[1][1] = min(r1 * a[1] + r1, r2);
  for (int i = 2; i <= n; i++) {
    f[i][0] =
        min(f[i - 1][0] + d + r1 * a[i] + r3,
            min(f[i - 1][1] + d + d + r1 + d + a[i] * r1 + r3,
                f[i - 1][1] + d + min(r2, a[i] * r1 + r1) + d + r1 + d + r1));
    f[i][1] = min(f[i - 1][0] + d + min(a[i] * r1 + r1, r2),
                  f[i - 1][1] + d + min(a[i] * r1 + r1, r2) + d + r1 + d);
  }
  cout << min(f[n][0], f[n - 1][1] + d + r1 * a[n] + r3 + d + r1);
  return 0;
}
