Andriy was in a hurry to get to the university and decided to rent a scooter. There are four types of subscriptions:
You can ride for any amount of time and pay x_1 coins for minute.
You buy a subscription for x_2 coins and can ride for t_2 minutes.
You buy a subscription for x_3 coins and can ride for t_3 minutes.
You buy a subscription for x_4 coins and can ride for t_4 minutes.
Each subscription can be purchased only once and they can be bought in any order.
To get to the university, Andriy needs minutes.
Tell Andriy the minimum number of coins he needs to spend to get to the university.
The first line contains four integers (1 \le x_1, x_2, x_3, x_4 \le 10^9) — the prices for riding the scooter. The second line contains three integers (1 \le t_2 < t_3 < t_4 \le 10^9) — the number of minutes for riding with the corresponding subscription. The third line contains one integer (1 \le q \le 10^9) — how much time Andriy needs to get to the university.
Output one integer — the minimum number of coins Andriy needs to spend to get to the university.
Example 1
It is most advantageous for Andriy to buy the third subscription for coins and not buy any other subscription.
Subtask ( points): (q \le t_2)
Subtask ( points): No additional constraints