#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long res = 1;
  a = a % 1000000007;
  while (b > 0) {
    if (b & 1) {
      res = (res * a) % 1000000007;
      b--;
    }
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return res;
}
long long fermat_inv(long long y) { return power(y, 1000000007 - 2); }
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    long long n, d, r1, r2, r3;
    cin >> n >> r1 >> r2 >> r3 >> d;
    long long a[n + 2];
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    vector<long long> dp(n + 2, 1e18);
    dp[0] = 0ll;
    for (int i = 1; i <= n; i++) {
      long long val = d + a[i] * min(r1, r3) + min(r3, 2 * d + 2 * min(r1, r2));
      ;
      if (i == 1) val -= d;
      dp[i] = min(dp[i], dp[i - 1] + val);
      val = d + r2 + 2 * d + min(r1, min(r2, r3));
      if (i == 1) val -= d;
      dp[i] = min(dp[i], dp[i - 1] + val);
      if (i + 1 <= n) {
        val = d;
        if (i == 1) val -= d;
        val += min(a[i] * (min(r1, r3)) + min(r3, 2 * min(r1, r2)),
                   r2 + min(r1, min(r2, r3)));
        val += min(a[i + 1] * (min(r1, r3)) + min(r3, 2 * min(r1, r2)),
                   r2 + min(r1, min(r2, r3)));
        dp[i + 1] = min(dp[i + 1], dp[i - 1] + 3 * d + val);
        val -= min(a[i + 1] * (min(r1, r3)) + min(r3, 2 * min(r1, r2)),
                   r2 + min(r1, min(r2, r3)));
        if (i + 1 == n) {
          dp[i + 1] = min(dp[i + 1], dp[i - 1] + 2 * d + val +
                                         a[i + 1] * (min(r1, r3)) + r3);
        }
      }
    }
    cout << dp[n] << "\n";
  }
  return 0;
}
