Problems
514 - Maximum Age
SUBMIT PROBLEM

Maximum Age

Time Limit: 1 sec

 

The Problem

A competition is going on. Teams can have N members. Your task is to find the most aged person of the team.

 

The Input

The input file contains several cases. Each case has two lines. First line is an integer N (0<= N < = 20) which denote the total team member. In the second line there will be N integer numbers which are the age of team members. Age range is in between 5 to 55. Input will terminate if N is ‘0’.

 

The Output

For each case print the most aged person age in a separate line.

 

Sample Input

5

5 6 7 8 9

6

20 21 22 23 24 25

0

 

Sample Output

9

25

 

 

 

 

Problem Setter: Samia Safa Ahmed