CF1037A Packets
题目描述
你有$n$个硬币,每个硬币价值都为$1$。
你要把它们分成若干个小包裹,使得在$1$与$n$之间的所有面额都能用这其中某几个小包裹凑出。
每个小包裹只能作为一个整体使用。
请求出最少要分几个包裹。
输入格式
一个数$n$($1\le n\le 10^9$)。
输出格式
输出最少要分几个包裹。
### 样例解释1:
分成$3$个包裹:$[1,2,3]$,可以凑出$1$到$6$中所有的面额。
说明/提示
In the first example, three packets with $ 1 $ , $ 2 $ and $ 3 $ coins can be made to get any amount $ x $ ( $ 1\leq x\leq 6 $ ).
- To get $ 1 $ use the packet with $ 1 $ coin.
- To get $ 2 $ use the packet with $ 2 $ coins.
- To get $ 3 $ use the packet with $ 3 $ coins.
- To get $ 4 $ use packets with $ 1 $ and $ 3 $ coins.
- To get $ 5 $ use packets with $ 2 $ and $ 3 $ coins
- To get $ 6 $ use all packets.
In the second example, two packets with $ 1 $ and $ 1 $ coins can be made to get any amount $ x $ ( $ 1\leq x\leq 2 $ ).