#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, t, x, ans = 0, sum = 0;
  cin >> n >> a >> b >> c >> t;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    sum += t - x;
  }
  if (b >= c)
    ans = a * n;
  else {
    ans = a * n + (c - b) * sum;
  }
  cout << ans << endl;
  return 0;
}
