#include <bits/stdc++.h>
using namespace std;
int n, x, y, z, f[1000000], k, ans = 0, a, b, c, t;
vector<long long> v;
map<long long, long long> m;
int main() {
  cin >> n >> a >> b >> c >> t;
  for (int i = 0; i < n; i++) cin >> f[i];
  sort(f, f + n);
  for (int i = 0; i < n; i++) {
    x = a;
    k = (t - f[i]) * c;
    k -= (t - f[i]) * b;
    k += a;
    x = max(x, k);
    ans += x;
  }
  cout << ans;
  return 0;
}
