#include <bits/stdc++.h>
using namespace std;
int n, A, B, C, T;
int temp[1005];
int main() {
  cin >> n >> A >> B >> C >> T;
  long long ans = 0;
  for (int i = 1; i <= n; i++) cin >> temp[i];
  ans = n * A;
  if (C > B) {
    for (int i = 1; i <= n; i++) ans += (C - B) * (T - temp[i]);
  }
  cout << ans << endl;
  return 0;
}
