1069: 向Z同学学习
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int m=cin.nextInt();int k=cin.nextInt();int result=0;while(m>0){
m--;result++;if(result%k==0) m++;}System.out.println(result);}
}