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