Π²Π°Π»ΠΈΠ΄Π°ΡΠΎΡ Π½Π΅ ΠΏΡΠΈΠ½ΠΈΠΌΠ°Π΅Ρ ΡΡΠ»ΠΎΠ²ΠΈΠ΅ β5
package com.javarush.task.task05.task0532;
import java.util.Scanner;
import java.io.*;
/*
ΠΠ°Π΄Π°ΡΠ° ΠΏΠΎ Π°Π»Π³ΠΎΡΠΈΡΠΌΠ°ΠΌ
*/
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());
if (a>0){
for(int i = 0; i<a; i++){
Scanner scan = new Scanner(System.in);
int ii = scan.nextInt();
if (ii>maximum && ii >=0) maximum = ii;
}
System.out.println(maximum);
}
//Π½Π°ΠΏΠΈΡΠΈΡΠ΅ ΡΡΡ Π²Π°Ρ ΠΊΠΎΠ΄
}
}