There are n incoming messages for Vasya. The i-th message is going to be received after t_{i} minutes. Each message has a cost, which equals to A initially. After being received, the cost of a message decreases by B each minute (it can become negative). Vasya can read any message after receiving it at any moment of time. After reading the message, Vasya's bank account receives the current cost of this message. Initially, Vasya's bank account is at 0.

Also, each minute Vasya's bank account receives C·k, where k is the amount of received but unread messages.

Vasya's messages are very important to him, and because of that he wants to have all messages read after T minutes.

Determine the maximum amount of money Vasya's bank account can hold after T minutes.


-----Input-----

The first line contains five integers n, A, B, C and T (1 ≤ n, A, B, C, T ≤ 1000).

The second string contains n integers t_{i} (1 ≤ t_{i} ≤ T).


-----Output-----

Output one integer  — the answer to the problem.


-----Examples-----
Input
4 5 5 3 5
1 5 5 4

Output
20

Input
5 3 1 1 3
2 2 2 1 1

Output
15

Input
5 5 3 4 5
1 2 3 4 5

Output
35



-----Note-----

In the first sample the messages must be read immediately after receiving, Vasya receives A points for each message, n·A = 20 in total.

In the second sample the messages can be read at any integer moment.

In the third sample messages must be read at the moment T. This way Vasya has 1, 2, 3, 4 and 0 unread messages at the corresponding minutes, he gets 40 points for them. When reading messages, he receives (5 - 4·3) + (5 - 3·3) + (5 - 2·3) + (5 - 1·3) + 5 =  - 5 points. This is 35 in total.

Difficulty: interview

Starter code:

Solutions:
n, a, b, c, t = list(map(int, input().split()))

lst = []
for x in input().split():
    lst.append(int(x))

if b > c:
    print(n * a)
else:
    acc = 0
    for x in lst:
        acc += (t - x)
    acc *= (c - b)
    acc += n * a
    print(acc)
    


n, A, B, C, T = map(int, input().split())
t = list(map(int, input().split()))

if C <= B:
    print(len(t) * A)
else:
    total = 0

    for ti in t:
        total += A + (T - ti) * (C - B)

    print(total)

import atexit
import io
import sys

# Buffering IO
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
    sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
    

def main():
    n, a, b, c, tt = [int(x) for x in input().split()]
    t = [int(x) for x in input().split()]
    
    s = a * n
    if c > b:
        for ti in t:
            s += (c-b) * (tt-ti)
    print(s)
            

    
def __starting_point():
    main()

__starting_point()

n, a, b, c, t = list(map(int, input().split()))
l = list(map(int, input().split()))
if b >= c:
    print(a*n)
else:
    ans = 0
    for i in l:
        ans += (t - i)*c + a - b*(t-i)
    print(ans)



n, a, b, c, t = map(int, input().split())
arr = list(map(int, input().split()))
if(b < c):
    ans = 0
    for i in range(n):
        ans += a + (c - b) * (t - arr[i])
    print(ans)
else:
    ans = 0
    for i in range(n):
        ans += a
    print(ans)

n,originCost,decCost,remainCost,T=list(map(int,input().split()))
msgTime=[*list(map(int,input().split()))]
result=0
for i in range(len(msgTime)):
  nextCost=(T-msgTime[i])*remainCost+(originCost-decCost*(T-msgTime[i]))
  result+=max(nextCost,originCost)
print(result)


def inpmap():
    return list(map(int, input().split()))
n, a, b, c, t = inpmap()
arr = inpmap()
if b >= c:
    print(a * n)
else:
    s = 0
    for x in arr:
        # print(s)
        s += a - (t - x) * b
        # print(a - (t - x) * b, (t - x) * c)
        s += (t - x) * c
    print(s)


n, a, b, c, t = map(int, input().split())
tt = [t - int(i) for i in input().split()]
ans = 0
if b >= c:
    print(a * n)
else:
    print(sum(tt) * (c - b) + a * n)

n, A, B, C, T = list(map(int, input().split()))
t = list(map(int, input().split()))
ans = A * n
if B < C:
    for time in t:
        ans += (T - time) * (C - B)
print(ans)


n, a, b, c, t = list(map(int, input().split()))
messages = list(map(int, input().split()))

if b < c:
    money = n * a
    for m in messages:
        money += (t - m) * (c - b)
else:
    money = n * a

print(money)


rd = lambda: list(map(int, input().split()))
n, a, b, c, t = rd()
y = list(rd())
print(sum([t * (c - b) + x * (b - c) + a for x in y]) if c > b else a * n)


n, a, b, c, t = list(map(int, input().split()))
v = sorted(list(map(int, input().split())))

ans = 0
for i in v:
    if i > t:
        break
    if (c > b):
        ans += (t - i) * (c - b) + a
    else:
        ans += a
print(ans)



#!/usr/bin/env python3
from sys import stdin, stdout

def rint():
    return list(map(int, stdin.readline().split()))
#lines = stdin.readlines()


n, A, B, C, T = rint()

t = list(rint())

D = C - B

if D < 0:
    print(n*A)
else:
    sum = A*n
    for i in range(n):
        sum += D*(T-t[i])
    print(sum)


n = list(map(int, input().split()))
t = list(map(int, input().split()))
ans = 0
if n[2] >= n[3]:
    print(n[0] * n[1])
else:
    for i in t:
        if i == n[4]:
            ans += n[1]
        else:
            ans += n[1] + (n[4]-i) * (n[3] - n[2])
    print(ans)

n, a, b, c, T = list(map(int, input().split()))
t = list(map(int, input().split()))
smth = [0] * T
for i in range(len(t)):
    smth[t[i] - 1] += 1
ans1 = 0
ans2 = 0
for i in range(len(t)):
    ans1 += a
k = 0
for i in range(T):
    ans2 += c * k
    k += smth[i]
for i in range(len(t)):
    ans2 += a - (T - t[i]) * b
print(max(ans1, ans2))
'''k = 0
for i in range(len(smth)):
    k += smth[i]
    k -= 1'''


R = lambda: list(map(int, input().split()))

n, A, B, C, T = R()
s = 0
for t in R():
    a = (T-t)*(C-B) if B<C else 0
    s += A + a
print(s)



n,a,b,c,t=map(int,input().split())
tl=list(map(int,input().split()))
ans=a*n
for i in tl:
    ans+=max((c-b)*(t-i),0)
print(ans)

n,a,b,c,t=list(map(int,input().split()))
l=[int(i) for i in input().split()]
if b >= c:
    print(n*a)
else:
    print(sum([a+(t-j)*(c-b) for j in l]))


n, a, b, c, t = list(map(int, input().split()))
time = list(map(int, input().split()))
ans = 0
if c >= b:
    for ti in time:
        ans += a + (c - b) * (t - ti)
else:
    ans = len(time) * a
print(ans)
    


# -*- coding: UTF-8 -*-

n, a, b, c, t = list(map(int, input().split()))
msg = [int(x) for x in input().split()]

if b >= c:
    print(a * n)
else:
    ret = 0
    for ti in msg:
        ret += a + (t - ti) * (c - b)
    print(ret)


n=list(map(int,input().split()))
a=list(map(int,input().split()))
if n[2]>=n[3]:
  print (n[0]*n[1])
else:
  print (n[0]*n[1]+(n[4]*n[0]-sum(a))*(n[3]-n[2]))

a,b,c,d,e=map(int,input().split())
k=list(map(int,input().split()))
k.sort()
i=0
x=0
while i<len(k):
    if k[i]<=e:
        if d>c:
            x=x+b+(d-c)*(e-k[i])
        else:
            x=x+b
    else:
        break
    i=i+1
print (x)

def solution(n, a, b, c, t, messages):
    account = 0
    for m in messages:
        if b >= c:
            account += a
        else:
            account += (c - b) * (t - m) + a
    return account

n, a, b, c, t = list(map(int, input().split()))
messages = list(map(int, input().split()))
print(solution(n, a, b, c, t, messages))


n, A, B, C, T = map(int, input().split())
t = list(map(int, input().split()))

if B >= C:
    print(A * n)
else:
    ans = A * n
    for time in t:
        ans += (C - B) * (T - time)
    print(ans)

n, a, b, c, t = [int(x) for x in input().split()]
array = [int(x) for x in input().split()]
ret = 0

if b < c:
    for i in array:
        ret += c*(t-i) + a-(t-i)*b
    print(ret)

else:
    print(n*a)