whyyyyyy!
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 = Integer.MIN_VALUE;
int n = 0;
while(true)
{
n = Integer.parseInt(reader.readLine());
if (n >0)
{
break;
}
}
for(int i=0; i<n; i++)
{
int x = Integer.parseInt(reader.readLine());
if (x > maximum)
{
maximum = x;
}
}
if (n>0) {
System.out.println(maximum);
}
}
}