import Control.Monad
import Control.Applicative
import Data.List



getBysplit = map read . words <$> getLine

main :: IO()
main = do
  lst <- getBysplit :: IO [Int]
  let [a, b] = sort lst
  let ans = if a == b
              then a + b
              else 2 * b -1
  print ans
