#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, A, B, C, T;
  cin >> n >> A >> B >> C >> T;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (B >= C) {
      sum += A;
    }
    if (B < C) {
      sum += A - ((T - x) * B) + ((T - x) * C);
    }
  }
  cout << sum;
}
