module Main where

import Data.List
import Control.Monad
import Debug.Trace
 
readTuple :: Read a  => IO (a, a)
readTuple = do
    [f, s] <- readLs
    pure (f, s)

readLs :: Read a => IO [a]
readLs = fmap read . words <$> getLine

solve :: Int -> Int -> Int
solve a b = first + second
    where
        first = max a b
        secondOne = first - 1
        secondTwo = min a b
        second = max secondOne secondTwo


main = do
    (a, b) <- readTuple
    print $ solve a b

