a = int()
b = int()

1 <= a <= b <=20

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


if b % a == 0:
    print(a + b)
else :
    print(b - a) a = int() a int() int b = int() b int() int 1 <= a <= b <=20 1 <= a <= b 1 <= a 1 a b 20 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 print(a + b) print a + b a b print(b - a) print b - a b a b = int() int() b a = int() int() 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()) (int(x) for x in input().split()) a
a = int()
b = int()

1 <= a <= b <=20

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


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