#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int t0;
    cin >> t0;
    if (c > b)
      ans += a + (c - b) * t + (b - c) * t0;
    else
      ans += a;
  }
  cout << ans << endl;
  return 0;
}
