[A,B] = list(map(int,input().split()))

if B%A == 0:
  print(A+B)
else:
  print(B-A) [A,B] = list(map(int,input().split())) [A,B] A B list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split 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
[A,B] = list(map(int,input().split()))

if B%A == 0:
  print(A+B)
else:
  print(B-A)