import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) mod=10**9+7 def main(): A,B=MI() if A==B: print(2*A-1) else: print(min(A,B)*2) main()