a,b=map(int,input().split()) if a-b >= 1: print(2*min(a,b)) else: print(2*min(a,b)-1)