//Anamary Leal
//Date: July 20, 2005
//Solution: Stolen Frisbee

import java.io.*;
import java.util.*;

public class StolenFrisbee
{

	public static void main(String args[]) throws IOException
	{

		//The room is selected at random
		Random r =  new Random();
		int secret = r.nextInt(15) + 400;

		int guess = 0, numguess = 0;
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

		while(guess != secret)
		{
			numguess ++;

			//The user inputs a guess
			System.out.println("Which room do you think the frisbee is in?");
			guess = Integer.parseInt(stdin.readLine());

			if(guess > secret)
			{
				System.out.println("Sorry, your guess is too high.");
			}
			else if (guess < secret)
			{
				System.out.println("Sorry, your guess is too low.");
			}
			//else the person found the right room
			else
			{
				System.out.println("You guessed the correct room number, let's play frisbee!!!");
			}
		}

		System.out.println("You found the frisbee in " + numguess + " guesses.");
	}

}