#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int r1 = n * a;
  int r2 = 0;
  for (int i = 0; i < n; i++) {
    r2 += (t - v[i]) * c;
  }
  for (int i = 0; i < n; i++) {
    r2 += a - b * (t - v[i]);
  }
  cout << max(r1, r2);
  return 0;
}
