import sys
A,B = map(int,input().split())
if not ( 1 <= A <= 20 and 1 <= B <= 20 ): sys.exit()
print(A + B) if B % A == 0 else print(B - A) import sys sys A,B = map(int,input().split()) A map(int,input().split()) map int input().split() ().split () input split B if not ( 1 <= A <= 20 and 1 <= B <= 20 ): sys.exit() not ( 1 <= A <= 20 and 1 <= B <= 20 ) 1 <= A <= 20 and 1 <= B <= 20 1 <= A <= 20 1 <= A 1 A 20 1 <= B <= 20 1 <= B 1 B 20 print(A + B) if B % A == 0 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 = map(int,input().split()) map(int,input().split()) B A,B = map(int,input().split()) map(int,input().split()) A
import sys
A,B = map(int,input().split())
if not ( 1 <= A <= 20 and 1 <= B <= 20 ): sys.exit()
print(A + B) if B % A == 0 else print(B - A)