inputs :: Read a => IO [a]
inputs = map read . words <$> getLine

f :: Int -> Int -> Int
f n m
    | n == m = 2 * m
    | otherwise = 2 * max n m - 1

main :: IO ()
main = do
    [a, b] <- inputs
    print (f a b)
