#include <bits/stdc++.h>
using namespace std;
using ll = long long;
inline void quickread() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed << setprecision(10);
}
inline void print_vector(vector<int> &A) {
  for (auto &&x : A) {
    cout << x << " ";
  }
  cout << endl;
}
inline void print_array(const int A[], int n) {
  for (int i = 0; i < n; ++i) {
    if (i < n - 1) {
      cout << A[i] << " ";
    } else {
      cout << A[i] << endl;
    }
  }
}
void chkmax(int &a, int b) { a = std::max(a, b); }
const int N = 1e6 + 5;
ll f[N][2];
int n, r1, r2, r3, d, a[N];
void upd(long long &a, long long b) { a = (a < b) ? a : b; }
inline void solve() {
  cin >> n >> r1 >> r2 >> r3 >> d;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 2; i <= n; ++i) f[i][0] = f[i][1] = 1e18;
  f[1][0] = 1ll * r1 * a[1] + r3;
  f[1][1] = min(0ll + r2, 1ll * r1 * a[1] + r1);
  for (int i = 1; i < n; ++i) {
    upd(f[i + 1][0], f[i][0] + d + 1ll * r1 * a[i + 1] + r3);
    upd(f[i + 1][1], f[i][0] + d + min(0ll + r2, 1ll * r1 * a[i + 1] + r1));
    upd(f[i + 1][0], f[i][1] + d + 1ll * r1 * a[i + 1] + r3 + 2 * d + r1);
    upd(f[i + 1][0], f[i][1] + d + 1ll * r1 * a[i + 1] + r1 + d + r1 + d + r1);
    upd(f[i + 1][0], f[i][1] + d + r2 + d + r1 + d + r1);
    upd(f[i + 1][1], f[i][1] + d + r2 + d + r1 + d);
    upd(f[i + 1][1], f[i][1] + d + 1ll * r1 * a[i + 1] + r1 + d + r1 + d);
    if (i == n - 1) {
      upd(f[i + 1][0], f[i][1] + d + 1ll * r1 * a[i + 1] + r3 + d + r1);
    }
  }
  cout << f[n][0] << endl;
}
int main() {
  quickread();
  int t = 1;
  for (int _ = 0; _ < t; _++) {
    solve();
  }
  return 0;
}
