#include <bits/stdc++.h>
using namespace std;
long long power(long long n, long long m) {
  long long res = 1;
  while (m) {
    if (m & 1) res = (res * n) % 1000000007;
    n = (n * n) % 1000000007;
    m /= 2;
  }
  return res;
}
int main() {
  long long n, a, b, c, t, i, j;
  long long k, s = 0, p = 0;
  cin >> n >> a >> b >> c >> t;
  map<long long, long long> mp;
  long long abab[n + 1];
  for (i = 0; i < n; i++) {
    cin >> abab[i];
    mp[abab[i]]++;
  }
  sort(abab, abab + n);
  for (auto it1 = mp.begin(); it1 != mp.end(); ++it1) {
    s = s + it1->second * a;
  }
  for (i = 0; i < n; i++) {
    p = p + (a - (t - abab[i]) * b);
  }
  long long cou = 0, answer1 = 0;
  for (i = 1; i <= t; i++) {
    answer1 += c * cou;
    if (mp.find(i) != mp.end()) {
      cou += mp[i];
    }
  }
  cout << max(s, answer1 + p);
}
