#include <bits/stdc++.h>
using namespace std;
void solve(int TestCase) {
  long long n, r1, r2, r3, d;
  cin >> n >> r1 >> r2 >> r3 >> d;
  vector<long long> A(n);
  for (auto& x : A) cin >> x;
  long long ret0 = A[0] * r1 + r3;
  long long ret1 = min(r2, r1 * A[0] + r1);
  for (auto i = 1; i < n; ++i) {
    long long plan1 = A[i] * r1 + r3;
    long long plan2 = min(r2, r1 * A[i] + r1);
    long long nxt_ret0 = ret0 + d + plan1;
    nxt_ret0 = min(nxt_ret0, ret0 + d + plan2 + 2 * d + r1);
    nxt_ret0 = min(nxt_ret0, ret1 + 3 * d + r1 + plan1);
    nxt_ret0 = min(nxt_ret0, ret1 + 3 * d + r1 + plan2 + r1);
    if (i == n - 1) {
      nxt_ret0 = min(nxt_ret0, ret1 + 2 * d + r1 + plan1);
    }
    long long nxt_ret1 = ret0 + d + plan2;
    nxt_ret1 = min(nxt_ret1, ret1 + 3 * d + r1 + plan2);
    swap(nxt_ret0, ret0);
    swap(nxt_ret1, ret1);
  }
  long long ret = ret0;
  cout << ret << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  for (auto i = 1; i <= t; ++i) {
    solve(i);
  }
}
