Every second the task distributor receives a new task. Tasks are numbered sequentially, starting from zero.
If the task number is not divided into K, then its execution on any server takes T seconds, otherwise it takes 2 × T seconds.
After receiving the task, the distributor immediately transfers it to one of the free servers. If there are no free servers at the time of the task's receipt, then a collapse occurs.
Initially, all servers are free. The server executing the task becomes free immediately when the task execution is finished.
What is the minimum number of servers needed to ensure that the collapse never occurs?
The first and only line contains two integers T (1 ≤ T ≤ 1018) and K (1 ≤ K ≤ 1018).
Display the minimum number of servers needed to ensure that the collapse never occurs.
4 3
6
3 4
4
2 2
3
1 2
2
| Name |
|---|


