﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LargestElementInArray
{
    class LargestElementInArray
    {
        static void Main(string[] args)
        {

            int arrayLenght = int.Parse(Console.ReadLine());
            int[] arrayOfInt = new int[arrayLenght];
            for (int i = 0; i < arrayLenght; i++)
            {
                int number =int.Parse(Console.ReadLine());

                arrayOfInt[i] = number;


                    
            }
            Console.WriteLine(arrayOfInt.Max());
        }
    }
}
