#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, t, x;
  cin >> n >> a >> b >> c >> t;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  if (c - b <= 0)
    cout << n * a;
  else {
    int sum = 0;
    for (int i = 0; i < n; i++) {
      sum += (c - b) * (t - v[i]);
    }
    cout << sum + n * a;
  }
  return 0;
}
