#include <bits/stdc++.h>
using namespace std;
int arr[1100];
int main() {
  int n, a, b, c, t, ans = 0, sum = 0;
  cin >> n >> a >> b >> c >> t;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum += t - arr[i];
  }
  ans = n * a;
  if (b >= c) {
    cout << ans << endl;
  } else {
    cout << ans + sum * (c - b) << endl;
  }
  return 0;
}
