public class Find_for
{
  public static void main(String args[])
  {

    TokenReader in = new TokenReader(System.in);

    double temp = 0;    
    double max  = 0;

    for (;;) {
      System.out.print("Enter a number: ");
      System.out.flush();    
      temp = in.readDouble();

      if (temp >= 0) {
	if (temp >= max)
	  max = temp;
      }
      else
	break;
    } 

    System.out.println();
    System.out.println("Maximum value: " + max);

  }
}
