import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PockyGame { public static void main(String[] args) throws IOException { // TODO 自動生成されたメソッド・スタブ //長さ int length; //齧るスピード int speed; //入力値 String[] input; //入力待ち BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); input = in.readLine().split(" "); length = Integer.parseInt(input[0]); speed = Integer.parseInt(input[1]); int counter = 0; while(true){ //ハルカちゃん length = length - speed; //ユウちゃん if(length - speed > 0){ length = length - speed; counter++; }else{ break; } } System.out.println(speed * counter); } }