AB = [int(i) for i in input().split()]
if(AB[1] % AB[0] == 0):
    print(AB[0] + AB[1])
else:
    print(AB[1] - AB[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 AB = [int(i) for i in input().split()] AB [int(i) for i in input().split()] if(AB[1] % AB[0] == 0):
    print(AB[0] + AB[1])
else:
    print(AB[1] - AB[0]) AB[1] % AB[0] == 0 AB[1] % AB[0] AB[1] AB 1 AB[0] AB 0 0 print(AB[0] + AB[1]) print AB[0] + AB[1] AB[0] AB 0 AB[1] AB 1 print(AB[1] - AB[0]) print AB[1] - AB[0] AB[1] AB 1 AB[0] AB 0 AB = [int(i) for i in input().split()] [int(i) for i in input().split()] AB
AB = [int(i) for i in input().split()]
if(AB[1] % AB[0] == 0):
    print(AB[0] + AB[1])
else:
    print(AB[1] - AB[0])