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