#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("-ffloat-store")
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, a, b, c, t, x;
  cin >> n >> a >> b >> c >> t;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    cin >> x;
    mp[x]++;
  }
  long long ans = (long long)n * a;
  if (b >= c) return cout << ans, 0;
  for (auto &it : mp) ans += (t - it.first) * it.second * (c - b);
  cout << ans << '\n';
  return 0;
}
