A,B = (int(X) for X in input().split())
if B%A==0: print(B+A)
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(B+A)
else: print(B-A) B%A==0 B%A B A 0 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,B = (int(X) for X in input().split())
if B%A==0: print(B+A)
else: print(B-A)