You have to buy N items to prepare RUN Spring Contest.
In Daejeon, there is a famous local currency, Ontongdaejeon.
Using Ontongdaejeon, you can get a cashback point when purchasing an item - precisely 10 percent of the cash you have paid as a cashback point.
If you have already got some cashback point from the previous purchases, you can use it instead of any non-negative integer amount of cash you want.
Specifically, you can use the cashback point with the following steps:
Let c be the amount of cashback point you already have and p be the price of an item you want to purchase.
You should determine the amount of cashback point to use. Let this be x.
x should satisfy following conditions:
Then, you can use x cashback points and p−x cash to buy the item.
After buying the item, the cashback point you would have is (c−x)+10p−x.
Find the minimum amount of cash required to buy N items in a given order.
Before buying the first item, you have no cashback points.
The first line contains one integer N, where N denotes the number of items.
The second line contains N space-separated integers P_1.P_2,...,P_N where P_i denotes the price of i-th item.
Find the minimum amount of cash required to buy all N items in a given order using Ontongdaejeon.