not able to complete the last task

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 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;
else
maximum = maximum;
}
//write your code here
System.out.println(maximum);
}
}

in line 15. int maximum = Integer.parseInt(reader.readLine()); you can not take input for maximum because you have to find the no which is maximum along all suppose user entered 1500 for maximum variable but the all input values are smaller then maximum variable it will print maximum as a maximumHint :initialize maximum = Integer.MIN_VALUE;this will start comparing from last negative integer number to find max among them