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