a, b = map(int, input().split())
num = b/a
if num.is_integer():
    print(a+b)
else:
    print(b-a) a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b num = b/a num b/a b a if num.is_integer():
    print(a+b)
else:
    print(b-a) num.is_integer() num.is_integer num is_integer print(a+b) print a+b a b print(b-a) print b-a b a num = b/a b/a num a, b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b
a, b = map(int, input().split())
num = b/a
if num.is_integer():
    print(a+b)
else:
    print(b-a)
