module Main where

main :: IO ()
main = input >>= output


input :: IO [Int]
input = getLine >>= return . ((map read) . words)

output :: [Int] -> IO ()
output [x,y]
    | x == y = print $ x * 2
    | otherwise = print $ x * 2 - 1

