#include <bits/stdc++.h>
using namespace std;
int e[10005];
int main() {
  long long n, a, b, c, t, res = 0;
  cin >> n >> a >> b >> c >> t;
  for (int i = 1; i <= n; i++) {
    cin >> e[i];
    res = res + a + (c - b) * (t - e[i]);
  }
  cout << max(res, a * n) << endl;
  return 0;
}
