#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const int INF = 2000000000;
const long long LINF = 2000000000000000000;
template <typename T>
void print(vector<T>& a) {
  for (int i = 0; i < a.size(); i++) cout << a[i] << ' ';
  cout << '\n';
}
template <typename T>
void print(deque<T>& a) {
  for (int i = 0; i < a.size(); i++) cout << a[i] << ' ';
  cout << '\n';
}
template <typename T>
void print(vector<vector<T>>& a) {
  for (int i = 0; i < a.size(); i++) {
    for (int j = 0; j < a[i].size(); j++) cout << a[i][j] << ' ';
    cout << '\n';
  }
}
template <typename T>
void input(vector<T>& a) {
  for (int i = 0; i < a.size(); i++) cin >> a[i];
}
template <typename T>
void input(deque<T>& a) {
  for (int i = 0; i < a.size(); i++) cin >> a[i];
}
template <typename T>
void input(vector<vector<T>>& a) {
  for (int i = 0; i < a.size(); i++)
    for (int j = 0; j < a[i].size(); j++) cin >> a[i][j];
}
void solve() {
  long long n, r1, r2, r3, d;
  cin >> n >> r1 >> r2 >> r3 >> d;
  vector<long long> a(n);
  input(a);
  vector<vector<long long>> dp(n, vector<long long>(2));
  dp[0][0] = a[0] * min(r1, r3) + r3;
  dp[0][1] = min(r2, (a[0] + 1) * r1);
  for (int i = 1; i < n; i++) {
    long long v1 = a[i] * min(r1, r3) + r3;
    long long v2 = min(r2 + min(r1, r3), (a[i] + 2) * r1);
    dp[i][0] =
        d + min({dp[i - 1][0] + v1, dp[i - 1][1] + 2 * d + v1 + min(r1, r3),
                 dp[i - 1][1] + 2 * d + v2 + min(r1, r3)});
    dp[i][1] = d + min({dp[i - 1][0] + r2, dp[i - 1][0] + r1 * (a[i] + 1),
                        dp[i - 1][1] + 2 * d + r2 + min(r1, r3),
                        dp[i - 1][1] + 2 * d + r1 * (a[i] + 1) + min(r1, r3)});
  }
  long long v = a[n - 1] * min(r1, r3) + r3;
  cout << min(dp[n - 1][0], dp[n - 2][1] + 2 * d + min(r1, r3) + v);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tst = 1;
  while (tst--) solve();
}
