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