A little hint is required.
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 maxValue = Integer.parseInt(reader.readLine());
int max = 0;
int count = 0;
//write your code here
if ( maxValue > 0) {
while (count < maxValue) {
int x = Integer.parseInt(reader.readLine());
if (x > max) {
max = x;
}
count++;
}
}
System.out.println(max);
}
}