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