#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000000 + 7;
int main() {
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  vector<int> ts(n);
  for (int i = 0; i < n; i++) cin >> ts[i];
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    long long ant = a - b * (ts[i]);
    long long curr = 0;
    for (int j = ts[i]; j <= t; j++) {
      ant -= b;
      curr = max(curr, (long long)(j - ts[i]) * (c - b) + a);
    }
    ans += curr;
  }
  cout << ans << endl;
  return 0;
}
