#include <bits/stdc++.h>
const int MAXN = 1e5 + 10;
using namespace std;
long long read() {
  long long x = 0, first = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') first = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return first * x;
}
int d[1005];
int main() {
  int n, a, b, c, t;
  n = read();
  a = read();
  b = read();
  c = read();
  t = read();
  int t1 = c - b;
  for (int i = 1; i <= n; i++) d[i] = read();
  if (t1 <= 0) {
    printf("%d\n", n * a);
  } else {
    int sum = 0;
    for (int i = 1; i <= n; i++) sum += (t - d[i]) * t1;
    sum += n * a;
    printf("%d\n", sum);
  }
  return 0;
}
