the last task not able to pass
package com.codegym.task.task05.task0532;
import java.io.*;
import java.lang.*;
/*
Task about algorithms
*/
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 = Integer.parseInt(reader.readLine());
for ( int i = 0; i<n-1 ; i++ ) {
int x = Integer.parseInt(reader.readLine());
if ( x >= maximum )
maximum = x;
}
if ( n > 0 ) {
System.out.println(maximum);
}
}
}