s = readline.chomp.to_i
h = {s => 1}

idx = 0
n = s

(2..1000000).each do |i|
  if n % 2 == 0
    n /= 2
  else
    n = 3*n + 1
  end
  #p n,i
  if h.has_key?(n)
    puts i
    break
  else
    h[n] = i
  end
end
