#include <bits/stdc++.h>
using namespace std;
long long n, A, B, C, T, i, t[100001], c, j, mx = -1e9, x, s, l, q, t1[100001],
                                             w;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> A >> B >> C >> T;
  for (i = 1; i <= n; i++) {
    cin >> t[i];
    t1[i] = A;
  }
  sort(t + 1, t + n + 1);
  for (i = 1; i <= T; i++) {
    c = 0;
    for (j = 1; j <= n; j++) {
      if (t[j] < i) c++;
      if (t[j] < i) t1[j] -= B;
    }
    s += (c * C);
  }
  for (i = 1; i <= n; i++) w += t1[i];
  if (s + w >= A * n)
    cout << s + w;
  else
    cout << A * n;
  return 0;
}
