main = do
    contents <- getContents
    let [num, n] = map (read :: String -> Int) (lines contents)
    putStrLn $ show $ solve num n 1
main = do
    contents <- getContents
    let [num, n] = map (read :: String -> Int) (lines contents)
    putStrLn $ show $ solve num n 1
main = do
    contents <- getContents
    let [num, n] = map (read :: String -> Int) (lines contents)
    putStrLn $ show $ solve num n 1