#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, A, B, C, T;
  scanf("%lld%lld%lld%lld%lld", &n, &A, &B, &C, &T);
  long long sum = 0;
  if (C <= B) return !printf("%lld\n", A * n);
  for (int i = 0; i < n; ++i) {
    long long tmp;
    scanf("%lld", &tmp);
    sum += (T - tmp) * (C - B);
    sum += A;
  }
  return !printf("%lld\n", sum);
}
