n,m = map(int,input().split())
if n==m&nbs***bsp;abs(n-m)==1:
    print(n+m)
else:
    print(min(n,m)*2 + 1)