import java.util.Scanner;

public class MaxNumber {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int max = Integer.MIN_VALUE;
		int n = Integer.parseInt(scanner.nextLine());
		for (int i = 0; i < n; i++) {
			int numbers = Integer.parseInt(scanner.nextLine());
			if (numbers > max) {
				max = numbers;
			}
		}
		System.out.println(max);
		scanner.close();
	}
}
