G. Task distributor
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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?

Input

The first and only line contains two integers T (1 ≤ T ≤ 1018) and K (1 ≤ K ≤ 1018).

Output

Display the minimum number of servers needed to ensure that the collapse never occurs.

Examples
Input
4 3
Output
6
Input
3 4
Output
4
Input
2 2
Output
3
Input
1 2
Output
2