#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 << A * n;
    return 0;
  }
  if (B == C) {
    cout << A * n;
    return 0;
  }
  int sum = 0;
  if (B < C) {
    for (int i = 0; i < n; i++) {
      sum = sum + A + (T - arr[i]) * (C - B);
    }
    cout << sum << endl;
    return 0;
  }
}
