#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 5;
long long f[MAXN][2], dat[MAXN];
inline int read() {
  int x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  long long n = read(), r1 = read(), r2 = read(), r3 = read(), d = read();
  for (int i = 1; i <= n; i++) dat[i] = read();
  f[1][0] = dat[1] * r1 + r3, f[1][1] = min(r2, dat[1] * r1 + r1);
  for (int i = 2; i <= n; i++) {
    f[i][0] =
        min(f[i - 1][0] + d + dat[i] * r1 + r3,
            f[i - 1][1] + d + r1 + d + min(dat[i] * r1 + r1, r2) + r1 + d);
    f[i][1] = min(f[i - 1][0] + d + min(r2, dat[i] * r1 + r1),
                  f[i - 1][1] + d + min(dat[i] * r1 + r1, r2) + d + r1 + d);
  }
  cout << min(f[n][0], f[n - 1][1] + d + dat[n] * r1 + r3 + d + r1) << endl;
  return 0;
}
