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