HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Maximum

Section problems

• A Palace with Many Columns
• X to the power of Y
• A+B
• T-shirts
• SAME OR DIFFERENT
• GCF
• REVERSE ORDER OF WORDS
• Factorial
• Maximum
• Name-Surname
• Decimal to binary
• Heap
• Herons
• Leap Year
• Perfect numbers
• Rectangle
• Bfs

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.

Problem description

You are given the list of N integers. Make a program to find the maximum item in the list.

Finding the maximum and minimum items is a fundamental algorithm in programming and has many applications. The algorithm is as follows:

Keep the first item as the maximum, and compare each item with the maximum. If the new value is bigger than the maximum, maximum gets the value of the new item.

Input

There is a single integer N on the first line (1 ≤ N ≤ 1000000), and N integres ai on the second line (|ai| < 2*109).

Output

Print the maximum value.

Example

stdin stdout

3
2 5 3

5

Для отправки решений необходимо выполнить вход.

www.contester.ru