#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
  int64_t numMessages, initialCost, loss, bonus, finalTime;
  std::cin >> numMessages >> initialCost >> loss >> bonus >> finalTime;
  int64_t answer = 0, deliveryTime, delta = bonus - loss;
  for (size_t i = 0; i != numMessages; ++i) {
    std::cin >> deliveryTime;
    if (delta >= 0) {
      answer += initialCost + delta * (finalTime - deliveryTime);
    } else {
      answer += initialCost;
    }
  }
  std::cout << answer << '\n';
}
