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