#include <bits/stdc++.h>
int main() {
  int n, A, B, C, T;
  int t[1000];
  int sum = 0;
  scanf("%d%d%d%d%d", &n, &A, &B, &C, &T);
  for (int i = 0; i < n; i++) scanf("%d", &t[i]);
  if (B >= C)
    printf("%d", n * A);
  else {
    for (int i = 0; i < n; i++) sum = sum + A + (C - B) * (T - t[i]);
    printf("%d", sum);
  }
}
