Problem:
 Score : 100 points    Problem Statement You are given positive integers A and B .  If A is a divisor of B , print A + B ; otherwise, print B - A .      Constraints  All values in input are integers.  1 \leq A \leq B \leq 20         Input Input is given from Standard Input in the following format:  A  B       Output If A is a divisor of B , print A + B ; otherwise, print B - A .        Sample Input 1 4 12      Sample Output 1 16  As 4 is a divisor of 12 , 4 + 12 = 16 should be printed.       Sample Input 2 8 20      Sample Output 2 12       Sample Input 3 1 1      Sample Output 3 2  1 is a divisor of 1 .

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a, b = map(int, input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a, b = (int(x) for x in input().split())
print(a+b) if b % a == 0 else print(b-a)

Solution (Python):
a,b=(int(x) for x in input().split())

if b % a ==0:
  print(a+b)
elif b % a !=0:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
A, B=map(int, input().split())


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

Solution (Python):
INPUT = list(map(int,input().split()))
A=INPUT[0]
B=INPUT[1]
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a, b = map(int, input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(b-a if b%a else a+b)

Solution (Python):
a,b=map(int,input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b= map(int,input().split())

if b % a == 0:
    print(a+b)

else:
    print(b-a)

Solution (Python):
A, B = tuple(map(int, input().split()))
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
a,b = map(int, input().split())

if b/a == int(b/a):
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b/a==(int(b/a)):
    print(a+b)
else:
    print(b-a)

Solution (Python):
'''A - B +/- A
https://atcoder.jp/contests/abc118/tasks/abc118_a

>>> main(4, 12)
16
>>> main(8, 20)
12
>>> main(1, 1)
2
'''


def main(a: int, b: int):
    if (b % a) == 0:
        print(a+b)
    else:
        print(b-a)


if __name__ == "__main__":
    a, b = map(int, input().split(' '))
    main(a, b)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    if b % a == 0:
        print(a + b)
    else:
        print(b - a)


if __name__ == '__main__':
    slove()

Solution (Python):
a,b = map(int, input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(B+A)
else:
    print(B-A)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    a, b = map(int, input().split())
    print(a + b if b % a == 0 else b - a)


if __name__ == "__main__":
    main()

Solution (Python):
A,B = map(int,input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
a, b = map(int, input().split())
print(a+b if b % a == 0 else b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
a,b=map(int,input().split())

if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
N, K = list(map(int, input().split()))
print(N + K) if K % N == 0 else print(K - N)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
print(b-a if b%a else a+b)

Solution (Python):
A,B=map(int,input().split())
print([B-A,A+B][B%A==0])

Solution (Python):


a, b = map(int, raw_input().split())

ans = 0

if b%a == 0:
    ans = a+b
else:
    ans = b-a

print ans

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
a,b=[int(s) for s in input().split()]
if(b%a==0):
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A,B = map(int,input().split(" "))

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

Solution (Python):
A,B=map(int,input().split())

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

Solution (Python):
a,b = map(int, input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(b-a if b%a else a+b)

Solution (Python):
A,B = map(int,input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())

if ( b % a == 0 ):
    print( a + b )
else:
    print( b - a )

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a,b = map(int,input().split())


print( a +b if b % a == 0 else b -a)

Solution (Python):
a,b=map(int,input().split());print(b + a*(b%a==0) - a*(b%a>0))

Solution (Python):
A, B=map(int, input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a, b = map(int, input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
a,b = map(int,input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A,B=[int(i) for i in input().split()]
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A, B =map(int, input().split())

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

else:
    print(B - A)

Solution (Python):
a, b = map(int, input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  ans = A + B
else:
  ans = B - A
  
print(ans)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a, b = map(int, input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(b-a if b%a else a+b)

Solution (Python):
a, b = map(int, input().split())
print(a+b if b % a == 0 else b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
	print(A+B)
else:
	print(B-A)

Solution (Python):
A,B = [int(i) for i in input().split()]

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

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A, B = map(int, input().split())
print(A+B if B%A == 0 else B-A)

Solution (Python):
A,B = map(int, input().split())

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

Solution (Python):
a, b = map(int, input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A,B = map(int,input().split())
if round(B%A) == 0:
  print(A + B)
else:
  print(B-A)

Solution (Python):
A,B = map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b % a == 0 else b-a)

Solution (Python):
a,b = map(int, input().split())

if b %a ==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())

print (a + b) if(b % a == 0) else print (b - a)

Solution (Python):
A,B =[int(x) for x in input().split()]
print(A+B if B%A==0 else B-A)

Solution (Python):
A,B=map(int,input().split())

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

Solution (Python):
A,B = map(int,input().split())
[print(A+B) if B%A == 0 else print(B-A)]

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b=map(int, input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b = [int(i) for i in input().split()]

if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B = map(int, input().split())
if B%A ==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b=map(int,input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(b+a)
else:
  print(b-a)

Solution (Python):
A,B = map(int,input().split())
print(A+B-2*A*(B%A>0))

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b%a == 0:
  print(a + b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(b+a)
else:
    print(b-a)

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

a,b=map(int,input().split())

if b%a==0:
	print(a+b)
else:
	print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b = map(int,input().split())
print(b-a if b%a else a+b)

Solution (Python):
a, b = list(map(int,input().split()))

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
if __name__ == '__main__':
    A, B = map(int, input().split())
    if B%A == 0:
        print(A+B)
    else:
        print(B - A)

Solution (Python):
a,b = map(int, input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):

a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A,B = [int(x) for x in input().split()]
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):

a,b=map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B=map(int,input().split());print(B-A if B%A else A+B)

Solution (Python):
A,B=map(int,input().split());print(B-A if B%A!=0else A+B)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B=map(int, input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A, B = map(int, input().split())
if B // A == B / A:
  print(B+A)
  exit()
print(B-A)

Solution (Python):
a,b=map(int,input().split())

if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int, input().split())

if b % a == 0:
  print(a + b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
A,B = map(int, input().split(" "))
print(A+B if B%A == 0 else B-A)

Solution (Python):
A,B = map(int,input().split())
ans = A+B if B%A == 0 else B-A
print(ans)

Solution (Python):
A, B = map(int, input().split())
if B % A:
  print(B - A)
else:
  print(A + B)

Solution (Python):
a, b = list(map(int, input().split()))

if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
import sys
input=sys.stdin.readline

def main():
    A,B = map(int, input().split())
    if B%A == 0:
        print(A+B)
    else:
        print(B-A)

if __name__ == '__main__':
    main()

Solution (Python):
s=list(input().split())
a=int(s[0])
b=int(s[1])

if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b//a == b/a else b - a)

Solution (Python):
A, B = map(int, input().split())
if B%A == 0:
  r = A+B
else:
  r = B-A
print(r)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A,B = map(int, input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split(" "))
if b % a == 0:
  print(a + b)
else:
  print(b-a)

Solution (Python):

a, b, = map(int, input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
a,b=map(int,input().split());print([a+b,b-a][b%a>0])

Solution (Python):
A , B = map(int,input().split())

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

else:
    print(B - A)

Solution (Python):
a,b = map(int, input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b = map(int,input().split())
if b%a ==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B=map(int, input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
A,B=map(int,input().split())

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

Solution (Python):
a,b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().split())
print(A + B if B % A == 0 else B - A)

Solution (Python):
a,b =map(int,input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a,b  = map(int,input().split())
if b%a:
    print(b-a)
else:
    print(a+b)

Solution (Python):
a,b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().split())

if B % A == 0:
    ans = A + B
else:
    ans = B - A

print(ans)

Solution (Python):
A,B = map(int, input().split())
if B%A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B = map(int,input().split())
if (B//A == B/A):
  print(A+B)
else: print(B-A)

Solution (Python):
a,b = map(int, input().split())
if b%a==0:
	print(a+b)
else:
	print(b-a)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
a,b = map(int,input().split())

if b % a ==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
print(a+b if b%a ==0 else b-a)

Solution (Python):
a, b = map(int, input().split(" "))

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a,b = map(int, input().split())
print(b-a if b%a else a+b)

Solution (Python):
import sys
input = sys.stdin.readline

N, M = map(int,input().split())
if M%N==0:
    print(M+N)
else:
    print(M-N)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(b-a if b%a else b+a)

Solution (Python):
A, B = map(int, input().split())
print(B + A if B % A == 0 else B - A)

Solution (Python):
A,B = map(int, input().split())

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

Solution (Python):
a,b = map(int,input().split())
print(a+b) if b%a==0 else print(b-a)

Solution (Python):
source = input().split()
a, b = int(source[0]), int(source[1])
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = map(int, input().split())
print(b-a if b%a else a+b)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B=map(int,input().split())
if B % A== 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):

A,B = list(map(int, input().split()))
if B % A == 0:
    print(A+B)
else:
    print(B - A)

Solution (Python):
a,b=map(int,input().split())
if b % a==0:
  print(a + b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):


a, b = map(int, input().split())

calc = b%a
if calc == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B=map(int,input().split())

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

Solution (Python):
a,b=map(int,input().split())

if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
def main():
    A, B = map(int, input().split())

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

main()

Solution (Python):
A, B = input().split()

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

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
A,B = list(map(int,input().split()))

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

Solution (Python):
A, B = map(int, input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a, b = map(int, input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = [int(_) for _ in input().split()]
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())
if b%a:
  print(b-a)
else:
  print(a+b)

Solution (Python):
A,B = list(map(int,input().split()))

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

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
a,b = map(int,input().split())
if(b%a==0):
    print(b+a)
else:
    print(b-a)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B=map(int,input().split())
print(B-A if B%A else A+B)

Solution (Python):
a,b = map(int,input().split())
print(b-a if b%a else a+b)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b = map(int,input().split())

if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
print((-1)**(b%a != 0)*a+b)

Solution (Python):
a,b=map(int,input().split())

if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
a,b=map(int,input().split())

if b % a == 0:
    print(a+b)
else:
   print(b-a)

Solution (Python):
A,B=map(int,input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b=map(int,input().split());print(b-a if b%a else b+a)

Solution (Python):
def main():
    A, B = map(int, input().split())
    if B % A == 0: return A+B
    else: return B- A

if __name__ == '__main__':
    print(main())

Solution (Python):

a, b = map(int, input().split())

if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())
print(B-A if B%A else A+B)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split());print(a+b if b%a==0 else b-a)

Solution (Python):
a, b = map(int, input().split())
if a <= a <= b <= 20:
    if 0 == b % a:
        print(a + b)
    else:
        print(b - a)
else:
    print('hoge')

Solution (Python):
a,b = map(int,input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
a, b = map(int, input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b=map(int,input().split())
print(b-a if b%a else a+b)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A + B)
else:
  print(B - A)

Solution (Python):
A, B = map(int, input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
a,b = map(int,input().split())


if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = map(int, input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
print('{0}'.format(a+b) if b%a==0 else '{0}'.format(b-a))

Solution (Python):
a, b = list(map(int, input().split()))
if b % a == 0:
	print(a+b)
else:
	print(b-a)

Solution (Python):
a,b=map(int,input().split())

print(b-a if b%a else a+b)

Solution (Python):
a, b = list(map(int, input().split()))

if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b=map(int, input().split())

if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a, b = map(int, input().split())

print(a+b if b%a ==0 else b-a)

Solution (Python):
A, B=map(int,input().split())
 
N = B % A
 
if N==0:
  Ans = A+B
else:
  Ans = B-A

print(Ans)

Solution (Python):
a,b=[int(e) for e in input().split()]
if(b%a==0):print(a+b)
else:print(b-a)

Solution (Python):
a, b = map(int, input().split())
print(b-a if b % a else a+b)

Solution (Python):
list1 = [i for i in input().split()]

num1 = int(list1[0])
num2 = int(list1[1])

if num2 % num1 == 0:
    print (num1+num2)
else:
    print (num2-num1)

Solution (Python):
a, b = map(int, input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b=map(int,input().split())

if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):


a, b = map(int, input().split())
if b % a:
    print(b-a)
else:
    print(a+b)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
def solve():
    a, b = map(int, input().split())
    return a + b if b % a == 0 else b - a


if __name__ == "__main__":
    print(solve())

Solution (Python):
A,B = map(int,input().split())

print([A+B,B-A][B%A!=0])

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b = map(int, input().split())
print(a+b if b % a == 0 else b-a)

Solution (Python):
A,B = map(int, input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b=input().split()
a,b=int(a),int(b)

if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
def test():
    a,b = map(int,input().split())

    if b % a == 0:
        print(a+b)
    else:
        print(b-a)


if __name__ == "__main__":
    test()

Solution (Python):
A,B=map(int,input().split())
if 0==B%A: print(A+B)
else: print(B-A)

Solution (Python):
import math





inputa = input().split()


a = int(inputa[0])
b = int(inputa[1])





if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int,input().split())

if b % a == 0:
    print(b + a)
else:
    print(b - a)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
A,B=map(int,input().split())
flag=0

for i in range(1,21):
    if B/A==i:
        flag+=1
        
if flag==0:
    print(B-A)
else :
    print(A+B)

Solution (Python):
a, b = map(int, input().split())
if b % a:
    print(b - a)
else:
    print(a + b)

Solution (Python):
a, b = map(int, input().split(' '))
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a, b = map(int, input().split(" "))
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a,b=map(int,input().split()); print(b-a if b%a else b+a)

Solution (Python):
a, b = map(int,input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A, B = map(int,input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
a,b=map(int,input().split())
print((str(b-a),str(a+b))[b%a==0])

Solution (Python):

A, B = map(int, input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int, input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A + B)
else:
  print(B - A)

Solution (Python):
a,b = map(int, input().split())

if b%a ==0 :
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split(' '))
print(a + b if b % a == 0 else b - a)

Solution (Python):
a,b = map(int,input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A,B = map(int, input().split())
print(B-A if B%A else A+B)

Solution (Python):

def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)

        return divisor_list

def main():
    A,B = map(int, input().split())
    div_list = make_divisor_list(B)

    if A in div_list:
        print(A+B)
    else:
        print(B-A)


if __name__ == '__main__' :
    main()

Solution (Python):
a,b=(int(x) for x in input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = list(map(int,input().split()))
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
L = input().split()
A = int(L[0])
B = int(L[1])
if B % A == 0:
  print(A + B)
else:
  print(B - A)

Solution (Python):
a,b = map(int, input().split())
print(a+b) if b%a==0 else print(b-a)

Solution (Python):


A, B = map(int, input().rstrip().split())

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

Solution (Python):
a,b = map( int, input().split() )

ret = 0;

if b % a == 0:
  ret = b + a
else:
  ret = b - a
    
print(ret )

Solution (Python):
a,b = map( int, input().split() )

ret = 0;

if a > b:
  if a % b == 0:
    ret = a + b
  else:
    ret = a - b
else:
  if b % a == 0:
    ret = b + a
  else:
    ret = b - a
    
    
print(ret )

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
  print(a + b)
else:
  print(b-a)

Solution (Python):
"""


     = sys.stdin.readline().rstrip()
     = list(sys.stdin.readline().rstrip())


     = int(sys.stdin.readline())
     = map(int, sys.stdin.readline().split())
     = list(map(int, sys.stdin.readline().split()))
     = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    A, B = map(int, sys.stdin.readline().split())
    if B % A == 0:
        print(A + B)
    else:
        print(B - A)

Solution (Python):
num = input().split()
a, b = int(num[0]), int(num[1])
if b%a==0: print(a+b)
else: print(b-a)

Solution (Python):

a,b = map(int,input().split())
if b % a == 0:
  print(b+a)
else:
  print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):

a, b = (int(_) for _ in input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
A, B = map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A, B = map(int, input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a, b = list(map(int, input().split()))
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):


a, b = [int(x) for x in input().split()]
print(a + b if b % a == 0 else b - a)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
	print(A+B)
else:
	print(B-A)