# util functions

# debug
$debugFlag = ( ARGV[0] != nil )
p "==== DEBUG MODE ====" if $debugFlag

def pd(str)
  p str if $debugFlag
end

def printd(str)
  print str if $debugFlag
end

# input
inputs = []
lc = 0
while l = $stdin.gets do
  if false
    inputs << l.chomp.split(" ").map(&:to_s)
  else
    inputs << l.chomp.split(" ").map(&:to_i)
  end
  lc += 1
end

# input check
if $debugFlag
  p "--- INPUT (begin) ---"
  inputs.each do |l_i|
    p l_i
  end
  p "--- INPUT (end) ---"
  print "\n"
end

nn = inputs[0][0]

# body
if $debugFlag
  p nn
end

arr = []

arr << nn
cnt = 2
while true
  if arr[-1] % 2 == 0
    x = arr[-1]/2
  else
    x = 3*arr[-1] + 1
  end
  flag = false
  arr.each do |a_i|
    if x == a_i
      flag = true
      break
    end
  end
  if flag == true
    puts cnt
    exit
  end
  arr << x
  cnt += 1
end
