using System;
public class Program
{
public static void Main()
int n = int.Parse(Console.ReadLine());
int count = 0;
int max = int.MinValue;
while(count< n)
int num = int.Parse(Console.ReadLine());
count++;
if (num > max)
max = num;
}
Console.WriteLine(max);