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

#交互に並べる。
cnt=abs(A-B)
if cnt<=1:
	print(A+B)
else:
	print(cnt-1+A+B)