#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double EPS = 1e-9;
const int inf = 1e9;
const double PI = 3.1415926535897932384626433832795;
const int N = 1 * 1e5 + 5;
int mas[1001];
int main() {
  ios_base::sync_with_stdio(0);
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  if (b > c) {
    return cout << n * a, 0;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> mas[i];
    ans += (t - mas[i]) * c + (a - (t - mas[i]) * b);
  }
  cout << ans;
  return 0;
}
