list1 = [i for i in input().split()]

num1 = int(list1[0])
num2 = int(list1[1])

if num2 % num1 == 0:
    print (num1+num2)
else:
    print (num2-num1) i for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() i list1 = [i for i in input().split()] list1 [i for i in input().split()] num1 = int(list1[0]) num1 int(list1[0]) int list1[0] list1 0 num2 = int(list1[1]) num2 int(list1[1]) int list1[1] list1 1 if num2 % num1 == 0:
    print (num1+num2)
else:
    print (num2-num1) num2 % num1 == 0 num2 % num1 num2 num1 0 print (num1+num2) print num1+num2 num1 num2 print (num2-num1) print num2-num1 num2 num1 num1 = int(list1[0]) int(list1[0]) num1 list1 = [i for i in input().split()] [i for i in input().split()] list1 num2 = int(list1[1]) int(list1[1]) num2
list1 = [i for i in input().split()]

num1 = int(list1[0])
num2 = int(list1[1])

if num2 % num1 == 0:
    print (num1+num2)
else:
    print (num2-num1)