Can you please tell me what is wrong with me code?
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
int maximum = Integer.MIN_VALUE ;
boolean x = true;
//write your code here
while ( x ) {
BufferedReader N = new BufferedReader(new InputStreamReader(System.in));
if(( Integer.valueOf(N.readLine()) > 0) && maximum < Integer.valueOf(N.readLine()) ) {
maximum = Integer.valueOf(N.readLine());
}
else if (Integer.valueOf(N.readLine()) < 0) {
x = false;
}
System.out.println(maximum);
}
}
}