#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 5;
const int inf = 0x3f3f3f3f;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = 10 * x + ch - '0';
    ch = getchar();
  }
  return f * x;
}
long long f[N][2], a[N], n, r1, r2, r3, d;
int main() {
  int T = 1;
  while (T--) {
    n = read(), r1 = read(), r2 = read(), r3 = read(), d = read();
    for (int i = 1; i <= n; i++) a[i] = read();
    f[1][0] = r1 * a[1] + r3;
    f[1][1] = min(r1 * (a[1] + 1), r2);
    for (int i = 2; i <= n; i++) {
      long long t1 = min(r1 * (a[i] + 1), r2);
      long long t2 = r1 * a[i] + r3;
      f[i][0] = f[i - 1][0] + t2 + d;
      f[i][0] = min(f[i][0], f[i - 1][0] + 3 * d + t1 + r1);
      f[i][0] = min(f[i][0], f[i - 1][1] + 3 * d + t1 + 2 * r1);
      f[i][0] = min(f[i][0], f[i - 1][1] + t2 + r1 + 3 * d);
      f[i][1] = f[i - 1][0] + d + t1;
      f[i][1] = min(f[i][1], f[i - 1][1] + t1 + r1 + 3 * d);
    }
    long long ans = min(f[n][0], f[n - 1][1] + 2 * d + r1 * (a[n] + 1) + r3);
    printf("%lld\n", ans);
  }
  return 0;
}
