import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Main {

    public static void getMultiple(String a) {
        String[] lineArray = a.split(",");
			int capNum = Integer.parseInt(lineArray[0]);
			int num = Integer.parseInt(lineArray[1]);
            int tempNum = 1;
			while(true){
				//check to see if it is a multiple
				//and if it is not already a multiple
				//then find the smallest multiple of that number
				if(capNum <= (num * tempNum)){
					System.out.println(num * tempNum);
					break;
				}
				else
					tempNum += 1;
			}
    }

    public static void main(String[] args) throws FileNotFoundException, IOException {
        File f = new File(args[0]);
        BufferedReader read = new BufferedReader(new FileReader(f));

        String line;
        while ((line = read.readLine()) != null) {
			getMultiple(line);
        }
    }
}