#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1000010;
long long n, d;
long long a[maxn];
long long r1, r2, r3;
long long dp[maxn][2];
signed main() {
  memset(dp, 0x3f, sizeof dp);
  cin >> n >> r1 >> r2 >> r3 >> d;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  dp[1][0] = a[1] * r1 + r3;
  dp[1][1] = min(a[1] * r1 + r1, r2);
  for (long long i = 1; i < n; i++) {
    dp[i + 1][1] = d + min(dp[i][0] + min(a[i + 1] * r1 + r1, r2),
                           dp[i][1] + 2 * d + r1 + min(a[i + 1] * r1 + r1, r2));
    dp[i + 1][0] =
        d + min(min(dp[i][1] + 2 * d + r1 + a[i + 1] * r1 + r3,
                    dp[i][0] + a[i + 1] * r1 + r3),
                dp[i][1] + 2 * r1 + 2 * d + min(a[i + 1] * r1 + r1, r2));
  }
  long long tp = dp[n - 1][1] + 2 * d + r1 + a[n] * r1 + r3;
  cout << min(dp[n][0], tp) << '\n';
  return 0;
}
