#include <bits/stdc++.h>
using namespace std;
long long int r, j, l, m, c, n, s, f, q, i, p, y, k, d, t, u, e, g, val, w, x,
    z;
string s1, s2, s3, s4;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int a, b, c;
  cin >> n >> a >> b >> c >> t;
  vector<long long int> v;
  for (long long int i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  k = 0;
  long long int it = 0;
  sort(v.begin(), v.end());
  if (b >= c) {
    cout << n * a;
  } else if (b < c) {
    p = 0;
    for (i = 1; i < t; i++) {
      while (it < n && v[it] == i) {
        p++;
        it++;
      }
      s += (c * p);
    }
    for (i = 0; i < n; i++) {
      s += (a - ((t - v[i]) * b));
    }
    cout << s;
  }
}
