#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, t[4000], f[4000], ans, T;
int main() {
  int z = 4;
  string s = "1234321";
  cin >> n >> a >> b >> c >> T;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    f[t[i]]++;
  }
  if (b >= c) {
    cout << n * a;
    return 0;
  }
  for (int i = 1; i < T; i++) {
    ans += f[i] * (a - (T - i) * b);
    f[i] += f[i - 1];
    ans += (f[i] * c);
  }
  ans += f[T] * a;
  cout << ans;
  return 0;
}
