#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 10;
const int maxm = 1000000 + 10;
const int mod = (int)1e9 + 7;
const int INF = 0x3f3f3f3f;
const long long LINF = (1LL << 62);
const double eps = 1e-9;
const double PI = acos(-1.0);
int main() {
  int n, A, B, C, T;
  cin >> n >> A >> B >> C >> T;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    ans += A;
    if (C >= B) {
      ans += (T - x) * (C - B);
    }
  }
  cout << ans << endl;
  return 0;
}
