import java.util.Scanner;

public class Cumulative_Max_v1
{
  public static void main(String[] args)
  {
    Scanner console = new Scanner(System.in);

    System.out.print("How many numbers? ");
    int n = console.nextInt(); // what happens if n is 0?

    double max = console.nextDouble();
    for (int i = 1 ; i < n ; i++)
    {
      double x = console.nextDouble();
      if (x > max)
      {
        max = x;
      }
    }
    System.out.println("The max = " + max);
  }
}
