the code works as it should with the exception of element 5. Please assist.
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = 0 ;
int N = Integer.parseInt(reader.readLine());
if (N <=0){
return ;
}
else{
for (int i = 0; i < N; i++){
int x = Integer.parseInt(reader.readLine());
if (x > maximum){
maximum = x;
}
}
System.out.println(maximum);
}
}
}