#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, t, g;
  long long res = 0;
  cin >> n >> a >> b >> c >> t;
  for (int i = 0; i < n; i++) {
    cin >> g;
    res += ((((a) > (a - (t - g) * (b - c))) ? (a) : (a - (t - g) * (b - c))));
  }
  cout << res;
}
