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