def f(n)
    n.even? ? n/2 : 3*n + 1
end
def main()
  s = gets.chomp.to_i
  a = [s]
  i = 0
  while 1 do
    result_of_f = f(a[i])
    unless a.include?(result_of_f)
      a << result_of_f
    else
      break
    end
    i += 1
  end
  puts "#{i+2}"
end
main
