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; for(int i=0; i<N; i++) { int n = Integer.parseInt(reader.readLine()); if(n > maximum) maximum = n; } //напишите тут ваш код System.out.println(maximum); }