*l, = map(int, open(0).read().split())
if l[1] % l[0] == 0:
	print(l[0] + l[1])
else:
	print(l[1] - l[0]) *l, = map(int, open(0).read().split()) *l l map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split if l[1] % l[0] == 0:
	print(l[0] + l[1])
else:
	print(l[1] - l[0]) l[1] % l[0] == 0 l[1] % l[0] l[1] l 1 l[0] l 0 0 print(l[0] + l[1]) print l[0] + l[1] l[0] l 0 l[1] l 1 print(l[1] - l[0]) print l[1] - l[0] l[1] l 1 l[0] l 0
*l, = map(int, open(0).read().split())
if l[1] % l[0] == 0:
	print(l[0] + l[1])
else:
	print(l[1] - l[0])