#include <bits/stdc++.h>
using namespace std;
template <class T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class T>
ostream& operator<<(ostream& os, unordered_set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class T>
ostream& operator<<(ostream& os, multiset<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class L, class R>
ostream& operator<<(ostream& os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.first << ":" << m.second << ") ";
  return os << "}";
}
template <class L, class R, class chash = std::hash<R>>
ostream& operator<<(ostream& os, unordered_map<L, R, chash> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.first << ":" << m.second << ") ";
  return os << "}";
}
void solve() {
  long long int n, r1, r2, r3;
  cin >> n >> r1 >> r2 >> r3;
  long long int d;
  cin >> d;
  vector<long long int> in(n);
  for (long long int i = 0; i < (long long int)(n); i++) cin >> in[i];
  for (long long int i = 0; i < (long long int)(n); i++) assert(in[i]);
  vector<long long int> a(n);
  vector<long long int> b(n);
  for (long long int i = 0; i < (long long int)(n); i++) {
    a[i] = min((in[i] + 1) * r1, r2);
    b[i] = in[i] * r1 + r3;
  }
  vector<vector<long long int>> dp(n, vector<long long int>(2));
  dp[0][0] = b[0];
  dp[0][1] = a[0];
  for (long long int i = 1; i <= (long long int)(n - 1); i++) {
    dp[i][0] = min({dp[i - 1][1] + 2 * d + a[i] + 2 * r1, dp[i - 1][0] + b[i],
                    dp[i - 1][1] + 2 * d + r1 + b[i]});
    dp[i][1] = min(dp[i - 1][0] + a[i], dp[i - 1][1] + 2 * d + r1 + a[i]);
  }
  long long int ans = min(dp[n - 1][0], dp[n - 2][1] + d + b[n - 1] + r1);
  cout << ans + (n - 1) * d << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  for (long long int i = 0; i < (long long int)(t); i++) {
    solve();
  }
}
