A tourist company could not sell (n < 15) vouchers to a ski resort due to severe frosts, and their validity period has already started. To minimize losses, starting from February 1, it was decided to sell all vouchers with d_k remaining days (d_k \leq 30) at their nominal value—c_k (c_k \leq 100) UAH per day, but only for the days remaining from the day of sale (k = 1, \dots, n).
What is the maximum total income the company can obtain by selling these vouchers if at most one voucher can be sold per day?
The first line contains the number of vouchers . Each of the next lines contains two integers: the number of days d_k left and the cost per day c_k.
Print the maximum total income.
Example 10