#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  int array[n + 1];
  int count[1002] = {0};
  for (int i = 0; i < n; i++) {
    cin >> array[i];
  }
  for (int i = 0; i < n; i++) {
    count[array[i]]++;
  }
  long long int ans = 0;
  for (int i = 1; i < t; i++) {
    long int prev = a - (t - i) * b + c * (t - i);
    if (a > prev) {
      ans = ans + count[i] * a;
    } else {
      ans = ans + count[i] * prev;
    }
  }
  ans = ans + a * count[t];
  cout << ans << endl;
}
