s = gets.chomp.to_i

def f(n)
  if n % 2 == 0 then
    n / 2
  else
    n * 3 + 1
  end
end

n = 1
an = s
a = []
while true do
  unless a.index(an).nil? then
    break
  end
  
  a.push(an)
  
  an = f(an)
  n += 1
end

puts n.to_s