#include <bits/stdc++.h>
using namespace std;
long long n, r, s, t, d, x, y = 1e18, m, u;
int main() {
  cin >> n >> r >> s >> t >> d;
  for (int i = 1; i <= n; ++i) {
    cin >> u;
    m = min(r * (u + 2), r + s);
    if (i < n)
      tie(x, y) =
          make_tuple(min({x + r * u + t, y + m, x + m + 2 * d}), x + m + 2 * d);
    else
      tie(x, y) = make_tuple(
          min({x + r * u + t, y + m, x + m + 2 * d, y + r * u + t - d}),
          x + m + 2 * d);
  }
  cout << x + d * (n - 1);
}
