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