The area where JOI lives has two water companies, company X and company Y. Each company sets the monthly bill from the amount of water used.
JOI's house uses P liters of water in a month.
JOI picks the company that makes the bill as cheap as possible. Find the monthly water bill of JOI's house.
The input has 5 lines, one integer per line.
A, B, C, D, and P are integers between 1 and 10000, inclusive.
Print the monthly water bill of JOI's house on the first line.
In the first example the usage is 10 liters.
Company X is cheaper, so the answer is 90 yen.
In the second example the usage is 250 liters.
Company Y is cheaper, so the answer is 1800 yen.