#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
long long n, d;
long long Dp[N][2];
long long A[N], r[4];
long long solve(int stage, bool notKilled) {
  if (stage == n) return notKilled ? d : 0;
  long long& ret = Dp[stage][notKilled];
  if (ret + 1) return ret;
  ret = 4e18;
  long long kill = min(r[1], r[3]);
  if (notKilled) {
    ret = min(ret, solve(stage + 1, 0) + A[stage] * kill + 2 * r[1] +
                       (stage == n - 1 ? 2 : 3) * d);
    ret = min(ret, solve(stage + 1, 0) + A[stage] * kill + r[3] +
                       (stage == n - 1 ? 1 : 3) * d);
    ret = min(ret,
              solve(stage + 1, 0) + r[2] + kill + (stage == n - 1 ? 2 : 3) * d);
  } else {
    ret = min(ret, solve(stage + 1, 1) + A[stage] * kill + 2 * r[1] + d);
    ret = min(ret, solve(stage + 1, 0) + A[stage] * kill + r[3] +
                       (stage != n - 1) * d);
    ret = min(ret, solve(stage + 1, 1) + r[2] + kill + d);
  }
  return ret;
}
int main() {
  scanf("%lld%lld%lld%lld%lld", &n, &r[1], &r[2], &r[3], &d);
  for (int i = 0; i < n; i++) scanf("%lld", A + i);
  memset(Dp, -1, sizeof Dp);
  printf("%lld\n", solve(0, 0));
  return 0;
}
