#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
const double PI = acos(-1.0);
char CRTBUFF[30000];
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int main() {
  int n, a, b, c, t;
  while (~scanf("%d%d%d", &n, &a, &b)) {
    scanf("%d%d", &c, &t);
    int arr[n];
    for (int i = (int)(0); i <= (int)(n - 1); i++) {
      scanf("%d", &arr[i]);
    }
    int res = 0;
    for (int i = (int)(0); i <= (int)(n - 1); i++) {
      int maxy = a;
      int now = a;
      for (int j = (int)(arr[i] + 1); j <= (int)(t); j++) {
        now += -b + c;
        maxy = max(maxy, now);
      }
      res += maxy;
    }
    printf("%d\n", res);
  }
  return 0;
}
