Amaru is buying souvenirs in a foreign shop. There are $N$ types of souvenirs. There are infinitely many souvenirs of each type available in the shop.
Each type of souvenir has a fixed price. Namely, a souvenir of type $i$ ($0 \leq i < N$) has a price of $P[i]$ coins, where $P[i]$ is a positive integer.
Amaru knows that souvenir types are sorted in decreasing order by price, and that the souvenir prices are distinct. Specifically, $P[0] > P[1] > \cdots > P[N-1] > 0$. Moreover, he was able to learn the value of $P[0]$. Unfortunately, Amaru does not have any other information about the prices of the souvenirs.
To buy some souvenirs, Amaru will perform a number of transactions with the seller.
Each transaction consists of the following steps:
Amaru hands some (positive) number of coins to the seller.
The seller puts these coins in a pile on the table in the back room, where Amaru cannot see them.
The seller considers each souvenir type $0, 1, \ldots, N-1$ in that order, one by one. Each type is considered exactly onceper transaction.
When considering souvenir type $i$, if the current number of coins in the pile is at least $P[i]$, then
The seller gives Amaru all the coins remaining in the pile and all souvenirs on the table.
Note that there are no coins or souvenirs on the table before a transaction begins.
Your task is to instruct Amaru to perform some number of transactions, so that:
Amaru does not have to minimize the number of transactions and has an unlimited supply of coins.