n,m = map(int,input().split()) if m==n: print(m*2) elif m==0 or n==0: print(1) else : print(min(n,m)*2+1)