P11052 [CodeChef] cr07
NOI
题目描述

POINTS - 25
Sahil is very fond of drinking juice. Every morning he drinks one full bottle of Juice. In every 'm' days, his mother buys one more bottle of juice ( i.e. on day m, 2m, 3m). She buys it in the evening. If Sahil initially has 'n' bottles of juice calculate the number of consecutive days that pass before he runs out of juice.
Input
The single line contains two integers n and m (1 ≤ n ≤ 100; 2 ≤ m ≤ 100), separated by a space.
Output
Print a single integer — the answer to the problem.
Sample test(s)
input
2 2
output
3
input
9 3
output
13

输入格式

见题面

输出格式

见题面

样例输入
9 3
样例输出
13