#include <bits/stdc++.h>
using namespace std;
long long binexp(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = ((res % m) * (a % m)) % m;
    a = ((a % m) * (a % m)) % m;
    b >>= 1;
  }
  return res % m;
}
signed main() {
  int n, A, B, C, T;
  cin >> n >> A >> B >> C >> T;
  int time[n];
  for (int i = 0; i < n; i++) cin >> time[i];
  int ans = 0;
  if (C > B) {
    for (int i = 0; i < n; i++)
      ans += A + C * (T - time[i]) - B * (T - time[i]);
  } else
    ans = n * A;
  cout << ans << endl;
  return 0;
}
