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