#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  int ar[n];
  for (int i = 0; i < n; i++) cin >> ar[i];
  if (c <= b) {
    cout << (n * a) << endl;
    return 0;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    ans += (t - ar[i]) * c;
    ans += (a - (t - ar[i]) * b);
  }
  cout << ans << endl;
  return 0;
}
