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:
    s=b+a
else:
    s=b-a

print(s)

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

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

Solution (Python):

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


if __name__ == '__main__':
    solve()

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 = (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):
def main():
    A, B = map(int, input().split())

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

    print(result)


if __name__ == '__main__':
    main()

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 = [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())
result = 0;

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

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):


N, K = (int(i) for i in input().split())

if K%N == 0:
    print(N+K)
else:
    print(K-N)

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,m=map(int,input().split())
if m%n==0:
    print(n+m)
else:
    print(m-n)

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

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

Solution (Python):
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):
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):

import sys
import math
import numpy as np
import itertools



a, b = (int(i) for i in 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:
  ret=a+b
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):
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(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())

i = 0
check = 0
while(B - A*i >= 0):
    if B - A*i == 0:
        check = 1
        break
    else:
        i += 1

if check == 1:
    print(A+B)
else:
    print(B-A)

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

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

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):


def solve(l1):

    l = [int(e) for e in l1.split(" ")]
    a = l[0]
    b = l[1]

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


    return str(result)

def main():
    
    params = []
    for i in range(0, 1):
        params.append(input())   
    print(solve(*params))

if __name__ == '__main__':

    main()

Solution (Python):
a,b = map(int,input().split())
for i in range(b+1):
    if a*i == b:
        print(a+b)
        exit()
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):
N = list(map(int, input().split()))
if(N[1] % N[0] ==0):
    print(N[0] + N[1])
else :
    print(N[1] - N[0])

Solution (Python):
A,B=(int(x) for x in input().split())

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

Solution (Python):
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().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) != 0:
    print(b-a)
else:
    print(a+b)

Solution (Python):
(A, B) = (int(i) for i in 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 = 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, raw_input().split())
c = b/a
if c*a == b:
    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):
import sys
sys.setrecursionlimit(10000)
input = sys.stdin.readline

def chkprint(a):
	a_name = ''
	for k, v in globals().items():
		if id(v) == id(a):
			a_name = k
			break
	print(a_name+' = '+str(a), file=sys.stderr)

def mt(f):
	import time
	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		print(e - s, 'sec', file=sys.stderr)
		return ret
	return wrap

A, B = [int(i) for i in 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())
print(A+B if B%A==0 else B-A)

Solution (Python):


"""
Created on 2019/2/16
Solved on 2019/2/16
@author: shinjisu
"""



def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def zeros(n): return [0]*n


def getIntLines(n): return [int(input()) for i in range(n)]


def getIntMat(n):
    mat = []
    for i in range(n):
        mat.append(getIntList())
    return mat


def zeros2(n, m): return [zeros(m)]*n


def dmp(x):
    global debug
    if debug:
        print(x)
    return x


def probA():
    A, B = getIntList()
    dmp((A, B))
    if B % A == 0:
        return A+B
    else:
        return B-A


debug = False  
print(probA())


def probB():
    N = getInt()
    A = getIntList()
    dmp((N, A))
    return 123


def probC():
    N = getInt()
    A = getIntList()
    dmp((N, A))
    return 123


def probD():
    N = getInt()
    A = getIntList()
    dmp((N, A))
    return 123

Solution (Python):


[a, b] = map(int, input().split(' '))

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

Solution (Python):
import sys





"""Template"""


class IP:
    """
    入力を取得するクラス
    """
    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x//y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def d(self, p):
        re = 0
        for i in range(len(p) - 1):
            re += ((p[i][0] - p[i + 1][0]) ** 2 + (p[i][1] - p[i + 1][1]) ** 2) ** 0.5
        return re


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    a, b = ip.IL()
    
    if b % a == 0:
        print(a + b)
    else:
        print(b - a)
main()

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())

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

Solution (Python):
i = input().rstrip().split(" ")
a = int(i[0])
b = int(i[1])
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 = list(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):
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())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):

"""
https://yahoo-procon2019-qual.contest.atcoder.jp/tasks/yahoo_procon2019_qual_a
"""


def sol(a, b):
    if b % a == 0: return a+b
    else: return b-a


test = False

if test:
    n, k = 4, 12
    
    print(sol(n, k))

    n, k = 8, 20
    
    print(sol(n, k))
    
    n, k = 31, 10
    
    print(sol(n, k))

    n, k = 10, 90
    
    print(sol(n, k))

else:
    a, b = map(int, input().split())
    
    print(sol(a, b))

Solution (Python):
a,b = map(int,input().split())
c = 0
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 = list(map(int, input().split()))
print(a[0]+a[1] if a[1]%a[0]==0 else a[1]-a[0])

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(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):

"""
Created on Sat Feb 16 20:52:15 2019

@author: Owner
"""


import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())
    
all(nstr.count(c) for c in '753')

ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))

(x >> i) & 1

"""


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:
    x = A+B
else:
    x = B-A
print(x)

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

Solution (Python):
import fileinput


def algorithm(a, b):
    return a + b if b % a == 0 else b - a


def pass_inputs(input_lines):
    a, b = input_lines[0]
    return algorithm(a, b)


def convert_int(s):
    try:
        r = int(s)
    except ValueError:
        r = s
    return r


def run():
    out = pass_inputs([[convert_int(v) for v in l.strip().split(" ")] for l in fileinput.input()])
    print(out)


if __name__ == "__main__":
    run()

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=input()
A=int(a.split()[0])
B=int(a.split()[1])

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

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

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

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(abs(a-b))

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

if b % a == 0:
  print("{}".format(a+b))
else:
  print("{}".format(b-a))

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

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

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

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(int(A+B))
else:
  print(int(B-A))

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


    return 0

if __name__=='__main__':
    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())

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

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

Solution (Python):

from collections import defaultdict
import math
import bisect
import random
def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return list(input())
def IIR(n): return [II() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
mod = 1000000007


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



"""
def gcd(a,b):
    if a == 0:
        return b
    return gcd(b%a,a)
n = II()
a = LI()
ans = a[0]
for i in range(1,n):
    ans = gcd(ans,a[i])
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==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(str(a+b))
else:
    print(str(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())

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):
Tmp = []
Tmp = input().rstrip().split(' ')

nA = int(Tmp[0])
nB = int(Tmp[1])

nTmp = nB % nA

if nTmp==0:
	print(nA+nB)
else:
	print(nB-nA)

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

sub = L[1] % L[0]

if sub == 0:
    print(L[0]+L[1])
else:
    print(L[1]-L[0])

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

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

if y%x == 0:
    print(x+y)
else:
    print(y-x)

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, raw_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(' '))
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())
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 = list(map(int, input().split()))
print(a+b if b % a == 0 else b-a)

Solution (Python):
A, B = map(int, raw_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)
elif b % a != 0:
    print(b - a)

Solution (Python):
a,b=map(int,input().split())
c=b//a
if c*a==b:
    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 = 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 = list(map(int, input().split()))

if a[1] % a[0] == 0:
    print(a[0] + a[1])
else:
    print(a[1] - 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 = list(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())
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):
b = input().split()
a = int(b[0])
b = int(b[1])
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):






def main():
    A, B = [int(i) for i in raw_input().strip().split(' ')]

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


if __name__ == '__main__':
    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())

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

print(ans)

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

Solution (Python):
A,B=input().split()
A=int(A)
B=int(B)
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, m = map(int, input().split())
if m % n :
  print(m - n)
else :
  print(n + m)

Solution (Python):

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

Solution (Python):
a=[]
a=input().split(" ")
A=int(a[0])
B=int(a[1])

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:
        ans = B + A
    else:
        ans = B - A

    print(ans)


if __name__ == '__main__':
    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())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
import sys

def main(inp):
    a,b=map(int,next(inp).split())
    if(b%a==0):
        return a+b
    else: return b-a
    
print(main(sys.stdin))

Solution (Python):
from sys import stdin

a, b = list(map(int, stdin.readline().rstrip().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 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()]

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:
    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:
  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):
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from functools import lru_cache, reduce
from math import ceil, floor

import heapq
import itertools
import operator


def get_int():
    return int(input())


def get_str():
    return input().strip()


def get_int_list():
    return [int(i) for i in input().split()]


def get_char_list():
    return list(input().strip())


def main():
    a, b = get_int_list()
    if b % a == 0:
        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 = (int(i) for i in input().split())
if((B%A)==0):
    print(int(A+B))

else:
    print(int(B-A))

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

Solution (Python):
if __name__ == '__main__':
    a, b = map(int, raw_input().split())

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

Solution (Python):
A, B = map(int, input().split())
for i in range(21):
    if A*i == B:
        print(A+B)
        break
else:
    print(B-A)

Solution (Python):
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())

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

Solution (Python):
A,B=[int(_) for  _ in 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 = [int(_) for _ in input().split()]
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
def inpl(): return list(map(int, input().split()))

A, B = inpl()
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())
ans = 0
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 == 0:
    print(B+A)
else:
    print(B-A)

Solution (Python):
import sys
input = sys.stdin.readline
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)