#include <bits/stdc++.h>
using namespace std;
const double P = 3.141592653589793;
long long inf = 4e18;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  long long r1, r2, r3, d;
  cin >> n >> r1 >> r2 >> r3 >> d;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long dp1 = 0;
  long long dp2 = inf;
  for (int i = 0; i < n; i++) {
    long long c1 = a[i] * r1 + r3;
    long long c2 = min({c1, r2 + r1, a[i] * r1 + r1 + r1});
    long long ndp1 = inf;
    long long ndp2 = inf;
    ndp1 = min({dp1 + c1, dp2 + c2 + d, ndp1});
    ndp2 = min({dp1 + c2 + d, ndp2});
    if (i == n - 1) {
      ndp1 = min(ndp1, dp2 + c1);
    }
    dp1 = ndp1;
    dp2 = ndp2;
  }
  cout << min(dp1, dp2 + d) + d * (n - 1);
  return 0;
}
