s = gets.to_i
arr = []
arr << s
i = 0
loop do
  if arr[i].even?
  	if arr.include?(arr[i]/2)
      puts i + 2
      exit
    end
    arr << arr[i]/2
  else
    if arr.include?(3 * arr[i] + 1)
      puts i + 2
      exit
  	end
    arr << 3 * arr[i] + 1
  end
  i += 1
end