def operate (n)
  if n.even?
    n/2
  else
    3*n + 1
  end
end

list = [gets.to_i]

count = 1

until list.include?(operate(list.last)) do
  list.push(operate(list.last))
  count += 1
end

puts count + 1