//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;
		Scanner stdin = new Scanner(System.in);

		while(guess != secret)
		{
			numguess ++;

			//The user inputs a guess
			System.out.println("Which room do you think the frisbee is in?");
			guess = stdin.nextInt();

			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.print("You guessed the correct room number,");
				System.out.println(" let's play frisbee!!!");
			}
		}

		System.out.println("You found the frisbee in " + numguess + " guesses.");
	}

}