#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  long long pi, la, aw, d;
  cin >> pi >> la >> aw >> d;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<vector<long long>> dp(n + 1, vector<long long>(2));
  dp[1][0] = min(pi * (a[1] + 1), la);
  dp[1][1] = pi * a[1] + aw;
  for (int i = 2; i <= n; i++) {
    long long half = min(pi * (a[i] + 1), la);
    long long all = pi * a[i] + aw;
    dp[i][0] =
        min(dp[i - 1][1] + d + half, dp[i - 1][0] + d + half + d + pi + d);
    dp[i][1] = min(
        dp[i - 1][1] + d + all,
        dp[i - 1][0] + min(d + half + d + pi + d + pi, d + all + d + pi + d));
  }
  long long half = min(pi * (a[n] + 1), la);
  long long all = pi * a[n] + aw;
  cout << min(dp[n - 1][1] + d + all,
              dp[n - 1][0] + min(d + half + d + pi + d + pi, d + all + d + pi));
}
