line = input() ls = line.split() a = int(ls[0]) b = int(ls[1]) x=0 while x <= b: x += a if x >= b: break print(x)