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