import Data.List -- sort
import Control.Monad -- replicateM

readInt = read <$> getLine :: IO Integer
arrayInt = map read . words <$> getLine :: IO [Integer]
writeln x = putStrLn $ unwords x :: IO ()

main = do
    [a,b] <- arrayInt
    print $ foldr max 0 [a+a-1,a+b,b+b-1]