#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;
  vector<int> times(n);
  for (int i = 0; i < n; ++i) cin >> times[i];
  int ans = a * n;
  if (b < c) {
    for (int i = 0; i < n; ++i) {
      ans += (t - times[i]) * (c - b);
    }
  }
  cout << ans << "\n";
}
