#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, -1, 1, 1, 1, -1, -1};
int dy[] = {-1, 1, 0, 0, 1, -1, 1, -1};
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
void solve(int i, int r) {}
int main() {
  fast();
  int n, a, b, c, t;
  cin >> n >> a >> b >> c >> t;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int read, unread, books;
  read = books = unread = 0;
  for (int i = 0; i < n; i++) {
    read += a;
    unread += a - (b * (t - v[i])) + c * (t - v[i]);
  }
  cout << max(read, unread);
}
