main = do
        str <- getLine
        let nums = map (read) (splitOn " " str) :: [Int]
        let res = if (nums !! 0 > nums !! 1) then (nums !! 0 - 1) else (minimum nums)
        putStrLn $ show res