#include <bits/stdc++.h>
using namespace std;
long long int C(long long int n, long long int r) {
  if (r > n - r) r = n - r;
  long long int ans = 1;
  for (long long int i = 1; i <= r; i++) {
    ans *= (n - r + i);
    ans /= i;
  }
  return ans;
}
long long int stringtointer(string a) { return stoi(a); }
long long int countdigit(long long int a) {
  long long int ans = 0;
  while (a) {
    a /= 10;
    ans++;
  }
  return ans;
}
long long int factorial(long long int n) {
  return (n == 1 || n == 0) ? 1 : n * factorial(n - 1);
}
long long int dayofweek(long long int d, long long int m, long long int y) {
  static long long int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
  y -= m < 3;
  return (y + y / 4 - y / 100 + y / 400 + t[m - 1] + d) % 7;
}
long long int floorSqrt(long long int x) {
  if (x == 0 || x == 1) return x;
  long long int start = 1, end = x, ans;
  while (start <= end) {
    long long int mid = (start + end) / 2;
    if (mid * mid == x) return mid;
    if (mid * mid < x) {
      start = mid + 1;
      ans = mid;
    } else
      end = mid - 1;
  }
  return ans;
}
bool checkpallindrome(string s) {
  string ans = s;
  reverse(ans.begin(), ans.end());
  if (ans == s) return true;
  return false;
}
long long int kadane(long long int a[], long long int size) {
  long long int max_so_far = INT_MIN, max_ending_here = 0;
  for (long long int i = 0; i < size; i++) {
    max_ending_here = max_ending_here + a[i];
    if (max_so_far < max_ending_here) max_so_far = max_ending_here;
    if (max_ending_here < 0) max_ending_here = 0;
  }
  return max_so_far;
}
long long int calc(long long int x, long long int y) {
  long long int res = 1;
  x = x % 1000000007;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long int gcdExtended(long long int a, long long int b, long long int *x,
                          long long int *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long int x1, y1;
  long long int gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long int modInverse(long long int a, long long int m) {
  long long int x, y;
  long long int g = gcdExtended(a, m, &x, &y);
  long long int res = (x % m + m) % m;
  return res;
}
void solve(long long int tc) {
  long long int n;
  cin >> n;
  long long int a, b, c, t;
  cin >> a >> b >> c >> t;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  if (b >= c) {
    cout << n * a << endl;
    return;
  }
  long long int sum = n * a;
  for (long long int i = 0; i < n; i++) {
    long long int lol = t - arr[i];
    sum += lol * (c - b);
  }
  cout << sum << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  long long int tc = 1;
  while (t--) {
    solve(tc);
    tc++;
  }
  return 0;
}
