#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 5;
const int INF = 1e9 + 7;
int n, a, b, c, t, g[maxn];
long long ans;
int main() {
  while (scanf("%d%d%d%d%d", &n, &a, &b, &c, &t) != EOF) {
    ans = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &g[i]);
    sort(g + 1, g + 1 + n);
    for (int i = 1; i <= n; i++) {
      if (b < c) {
        int gk = (t - g[i]) * c + a - b * (t - g[i]);
        ans += gk;
      } else
        ans += a;
    }
    printf("%lld\n", ans);
  }
}
