#include <bits/stdc++.h>
using namespace std;
const long long M = 1e5 + 5;
void solve() {
  long long n;
  long long A, B, C, T;
  cin >> n >> A >> B >> C >> T;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  if (C > B) {
    long long sum = 0;
    for (long long i = 0; i < n; i++) sum += (T - a[i]) * C;
    for (long long i = 0; i < n; i++) sum += (A - (B * (T - a[i])));
    cout << sum << endl;
  } else {
    long long sum = n * A;
    cout << sum << endl;
  }
}
int main() {
  int kse = 1;
  while (kse--) {
    solve();
  }
}
