#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int neginf = 0xc0c0c0c0;
const int mod = 1000000007;
bool cmp(const double& a, const double& b, const double TOL = 1e-9) {
  return (a + TOL > b) ? (b + TOL > a) ? 0 : 1 : -1;
}
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
  }
  return res;
}
int n, A, B, C, T;
int main() {
  cin >> n >> A >> B >> C >> T;
  vector<int> msg(n);
  for (int(i) = (0); (i) < (n); ++(i)) cin >> msg[i];
  sort((msg).begin(), (msg).end());
  int last = msg.back();
  long long best = 0;
  for (int v : msg) {
    int gain;
    if (C > B) {
      gain = A + (T - v) * (C - B);
    } else
      gain = A;
    best += gain;
  }
  cout << best << endl;
  return 0;
}
