import Data.List

main :: IO ()
main = do
  s <- getLine
  putStrLn $ show (solve (read s))

solve :: Int -> Int
solve s = solve' [] s 0 where
  solve' :: [Int] -> Int -> Int -> Int
  solve' list s i
    | (length $ nub list) < (length $ list) = i
    | even s = solve' (list ++ [s]) (s `div` 2) (i + 1)
    | odd s = solve' (list ++ [s]) (3 * s + 1) (i + 1)
    | otherwise = 0
