#include <bits/stdc++.h>
using namespace std;
vector<int> messages;
int main() {
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  int total = 0;
  for (int i = 0; i < n; i++) {
    int ti;
    cin >> ti;
    if (b > c) {
      break;
    } else {
      total += (t - ti) * (c - b) + a;
    }
  }
  if (b > c) {
    cout << n * a << endl;
  } else {
    cout << total << endl;
  }
}
