Problem: You have coins, each of the same value of .
Distribute them into packets such that any amount () can be formed using some (possibly one or all) number of these packets.
Each packet may only be used entirely or not used at all. No packet may be used more than once in the formation of the single , however it may be reused for the formation of other 's.
Find the minimum number of packets in such a distribution.
Input Format: The only line contains a single integer () — the number of coins you have.
Output Format: Output a single integer — the minimum possible number of packets, satisfying the condition above.
Note: In the first example, three packets with , and coins can be made to get any amount ().
- To get use the packet with coin.
- To get use the packet with coins.
- To get use the packet with coins.
- To get use packets with and coins.
- To get use packets with and coins
- To get use all packets.
In the second example, two packets with and coins can be made to get any amount ().