#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, t, rez1 = 0, rez2 = 0, x;
  cin >> n >> a >> b >> c >> t;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    rez1 += a - (t - x) * (b - c);
    rez2 += a;
  }
  cout << max(rez1, rez2);
  return 0;
}
