import Data.Vector as V

m :: Int
m = 1000000

main = do
  s <- readLn
  let v = V.replicate m 0
      v' = v // [(s,1)]
  print $ solve s v' 0 + 2

f :: Int -> Int
f n = if n `mod` 2 == 0 then n `div` 2 else 3*n+1

solve :: Int -> Vector Int -> Int -> Int
solve a v cnt= 
  if v ! b == 1 
    then cnt
    else solve b v' (cnt+1)
  where b = f a
        v' = v // [(b,1)]
