Vasya and Socks

题意翻译

## 题目描述 **Vasya**有$n$双袜子。作为一个浪费的人**[浪费可耻]**,他每穿完一双袜子,就直接扔掉了。他的母亲每过$m$天就会买$1$双袜子。多少天过后他就没袜子穿了呢$?$ ## 输入输出格式 ### 输入格式 一行,两个正整数 $n(1\leq n\leq100)$与 $m(2 \leq m \leq 100)$,用空格隔开。 ### 输出格式 一个数,表示哪一天袜子用完了。 ## 说明 第一个例子中,他穿了两天原来有的袜子,第三天穿了妈妈买的那一双。 第二个例子中,**Vasya**穿了$9$天原有的袜子,又穿了$3$天分别在$3,6,9$天妈妈买的。最后在第$13$天,他穿了在第$12$天买的袜子。 **翻译来自@丁文涛2004**

题目描述

Vasya has $ n $ pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When he comes home in the evening, Vasya takes off the used socks and throws them away. Every $ m $ -th day (at days with numbers $ m,2m,3m,... $ ) mom buys a pair of socks to Vasya. She does it late in the evening, so that Vasya cannot put on a new pair of socks before the next day. How many consecutive days pass until Vasya runs out of socks?

输入输出格式

输入格式


The single line contains two integers $ n $ and $ m $ $ (1<=n<=100; 2<=m<=100) $ , separated by a space.

输出格式


Print a single integer — the answer to the problem.

输入输出样例

输入样例 #1

2 2

输出样例 #1

3

输入样例 #2

9 3

输出样例 #2

13

说明

In the first sample Vasya spends the first two days wearing the socks that he had initially. Then on day three he puts on the socks that were bought on day two. In the second sample Vasya spends the first nine days wearing the socks that he had initially. Then he spends three days wearing the socks that were bought on the third, sixth and ninth days. Than he spends another day wearing the socks that were bought on the twelfth day.