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