n,m=map(int,input().split())
ans=min(n,m)*2
if n!=m:
    ans+=1
print(ans)

要考虑n!=m的情况