...
package com.javarush.task.task05.task0532;
import javax.swing.plaf.nimbus.AbstractRegionPainter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Задача по алгоритмам Ӏ Java Syntax: 5 уровень, 12 лекция
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = 0;
int a = Integer.parseInt(reader.readLine());
int b = 0;
if (a <= 0)
{
}
else
{
b = a;
}
int[] array = new int[b];
for (int i = 0; i < array.length; i++)
{
array[i] = Integer.parseInt(reader.readLine());
}
for (int j = 0; j < array.length; j++)
{
if (maximum < array[j])
{
maximum = array[j];
}
}
if (maximum <= 0)
{
}
else {
System.out.println(maximum);
}
//напишите тут ваш код
}
}