an = gets.to_i
n = 1
a = [an]
frag = false
ans = nil
while frag == false do 
  n += 1
  if an % 2 == 0 then an = an/2 
  else an = 3*an + 1
  end
  (a.length-1).downto(0) do |o|
    if a[o] == an 
      ans = n
      frag = true
    end
  end
  a.push(an)
end
puts ans
