S = gets.to_i


stack = []
current = S
stack << current

while true do
  if current.even?
    current = current / 2
  else
    current = current * 3 + 1
  end
  if stack.index(current)
    puts stack.size + 1
    break
  end
  stack << current
end