#include <bits/stdc++.h>
using namespace std;
long long n, a, b, c, t;
long long d[1005];
int main() {
  cout << setprecision(10) << fixed;
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> n >> a >> b >> c >> t;
  for (int i = 1; i <= n; i++) cin >> d[i];
  sort(d + 1, d + n + 1);
  long long res = a * n;
  for (long long i = 1; i <= n; i++) res -= (t - d[i]) * b;
  for (long long i = 1; i <= n; i++) res += c * (i - 1) * (d[i] - d[i - 1]);
  res += c * n * (t - d[n]);
  cout << max(res, a * n);
  return 0;
}
