a, b = io.read("*n", "*n") if b < a then a, b = b, a end if a == b then print(a + b - 1) else print(a * 2) end