#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, A, B, C, T;
  cin >> n >> A >> B >> C >> T;
  int times[n];
  for (int i = 0; i < n; i++) {
    cin >> times[i];
  }
  long long total = 0;
  if (C <= B) {
    cout << A * n << endl;
  } else {
    for (int i = 0; i < n; i++) {
      int t = T - times[i];
      total += A;
      total -= t * B;
      total += t * C;
    }
    cout << total << endl;
  }
}
