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