public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(reader.readLine()); int maximum = 0; int eingabeAnzahl = 0; if (N <= 0){ } else { while (true){ int z = Integer.parseInt(reader.readLine()); eingabeAnzahl++; maximum = z >= maximum ? z : maximum; if (eingabeAnzahl == N){ break; } } System.out.println(maximum); } } }