#include <bits/stdc++.h>
using namespace std;
long long n, a, b, c, T, t;
int main() {
  scanf("%lld%lld%lld%lld%lld", &n, &a, &b, &c, &T);
  long long ans = n * a;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &t);
    if (b < c) ans += (T - t) * (c - b);
  }
  printf("%lld\n", ans);
}
