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