a,b = [int(x) for x in input().split()]

if b%a==0:print(a+b)
else:print(b-a) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a,b = [int(x) for x in input().split()] a [int(x) for x in input().split()] b if b%a==0:print(a+b)
else:print(b-a) b%a==0 b%a b a 0 a,b = [int(x) for x in input().split()] [int(x) for x in input().split()] a b = [int(x) for x in input().split()] [int(x) for x in input().split()] b
a,b = [int(x) for x in input().split()]

if b%a==0:print(a+b)
else:print(b-a)