Need help :) ,i cant see whats wrong
package com.codegym.task.task05.task0532;
import java.io.*;
import java.lang.reflect.Array;
import java.util.Arrays;
/*
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 = 0;
if (n > 0) {
for (int i = 0; i < n; i++) {
int a = Integer.parseInt(reader.readLine());
if (maximum < a) {
maximum = a;
}
}
if (maximum<n)
maximum=n;
System.out.println(maximum);
}
}
}