#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
const int Mod = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double e = 2.718281828459045235360287471352662;
const double PI = acos(-1);
const double ERR = 1e-10;
int ti[maxn];
int main() {
  ios::sync_with_stdio(false);
  int n, a, b, c, t;
  long long ans = 0;
  cin >> n >> a >> b >> c >> t;
  for (int i = 1; i <= n; i++) cin >> ti[i];
  for (int i = 1; i <= n; i++) {
    if ((t - ti[i]) * (c - b) <= 0)
      ans += a;
    else
      ans += a + (t - ti[i]) * (c - b);
  }
  cout << ans << endl;
  return 0;
}
