#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, t, r = 0, k;
int main() {
  cin >> n >> a >> b >> c >> t;
  while (n-- && std::cin >> k) r += c > b ? (t - k) * (c - b) + a : a;
  cout << r;
}
