#include <bits/stdc++.h>
using namespace std;
using lli = long long;
using ld = long double;
inline void Solve() {
  lli n = 0, a = 0, b = 0, c = 0, t = 0;
  cin >> n >> a >> b >> c >> t;
  vector<lli> data(n);
  for (lli i = 0; i < n; i++) cin >> data[i];
  lli result = 0;
  for (lli i = 0; i < n; i++) {
    if (a + (c - b) * (t - data[i]) > a)
      result += a + (c - b) * (t - data[i]);
    else
      result += a;
  }
  cout << result;
}
signed main() {
  cout << fixed << setprecision(20);
  Solve();
  return 0;
}
