To calculate a client's invoice for a certain period, a water company calculates the amount of cubic metres consumed based on the meter reading $$R_1$$ at the beginning of the period and the meter reading $$R_2$$ at the end of a period. The total price consists of a fixed tariff $$S$$, plus a fee for the cubic metres consumed. The first $$N$$ cubic metres are calculated at a rate of $$P_1$$, the rest is calculated at a (lower) rate $$P_2$$.
The values for $$R_1$$, $$R_2$$, $$S$$, $$N$$, $$P_1$$ and $$P_2$$, in that order and on separate lines, in cubic metres or in euros.
The total amount due (in euros).
Input:
15.145
26.236
5
3.14
4.321
3.456
Output:
46.046596