numbers = [int(i) for i in input().split()]

if numbers[1]%numbers[0] == 0:
	print(numbers[1] + numbers[0])
else:
	print(numbers[1] - numbers[0]) int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i numbers = [int(i) for i in input().split()] numbers [int(i) for i in input().split()] if numbers[1]%numbers[0] == 0:
	print(numbers[1] + numbers[0])
else:
	print(numbers[1] - numbers[0]) numbers[1]%numbers[0] == 0 numbers[1]%numbers[0] numbers[1] numbers 1 numbers[0] numbers 0 0 print(numbers[1] + numbers[0]) print numbers[1] + numbers[0] numbers[1] numbers 1 numbers[0] numbers 0 print(numbers[1] - numbers[0]) print numbers[1] - numbers[0] numbers[1] numbers 1 numbers[0] numbers 0 numbers = [int(i) for i in input().split()] [int(i) for i in input().split()] numbers
numbers = [int(i) for i in input().split()]

if numbers[1]%numbers[0] == 0:
	print(numbers[1] + numbers[0])
else:
	print(numbers[1] - numbers[0])