a, b = map(int, raw_input().split())
d = b + a
x = b - a
if b % a == 0:
    print d
else:
    print x a, b = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b d = b + a d b + a b a x = b - a x b - a b a if b % a == 0:
    print d
else:
    print x b % a == 0 b % a b a 0 print print x = b - a b - a x d = b + a b + a d b = map(int, raw_input().split()) map(int, raw_input().split()) b a, b = map(int, raw_input().split()) map(int, raw_input().split()) a
a, b = map(int, raw_input().split())
d = b + a
x = b - a
if b % a == 0:
    print d
else:
    print x