Vasya has one package of mobile phone operator Ratsviyk and
S0 tugriks on its account. (Tugrik is the currency in Vasya’s country. 0.01 of tugrik is a cent). Also he has
n packages of Eciujd which is the satellite of Ratsviyk. There are
Si tugriks on the account of the
i-th package of Eciujd. There was a new tariff plan on Ratsviyk and Vasya want to go into it. For this purpose it is necessary to have at least
S tugriks on the account. Vasya hasn’t any money, that is why he don’t want to buy new bill replenishment, to fill up the Ratsviyk account to the necessary sum. But the escape exists.
On Ratsviyk there is such possibility as to transfer money between each others. The transfer is the sending of some money from one account to another. It is possible to send only an integer amounts of tugriks, not smaller than 5. The cost of the transfer is 10 cents which is draw from the account from which money was sended. Transfer can be made only if after it on the account remains at least 5 tugriks. Since Eciujd is the satellite of Ratsviyk, then subscribers of Eciujd also can participate in this transfers.
1 ≤ i ≤ n) find whether it is possible to go into new tariff plan without buying new bill replenishment and if so find the minimum number of transfers needed for this.
In the first line of input there is an integer
0 ≤ n ≤ 1000),
S. In the second line are written down through a blank numbers
Sn. All numbers
0 ≤ i ≤ n) - real numbers from the interval [
10000.00] with exactly with two digits after a decimal point.
Output the minimum number of transfers needed to go into new tariff plan or -1 if it is impossible without buying a new bill replenishment.
2 10.10 16.00 10.10 7.10