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