#include <bits/stdc++.h>
using namespace std;
const long long N = 1e3 + 5;
const long long oo = 1e9 + 7;
long long n, A, B, C, T, ans = 0;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> A >> B >> C >> T;
  while (n--) {
    long long t;
    cin >> t;
    long long res = -oo;
    for (long long i = t; i <= T; ++i) res = max(res, A + (C - B) * (i - t));
    ans += res;
  }
  cout << ans << endl;
}
