BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = MIN_VALUE;
int n = Integer.parseInt(reader.readLine());
if (n>0) {
for (int i = 0; i < n; i++) {
int num = Integer.parseInt(reader.readLine());
if (num > maximum) {
maximum = num;
}
}
}
if (maximum>0)
System.out.println(maximum);
else;
package com.codegym.task.task05.task0532;
import java.io.*;
import static java.lang.Integer.MIN_VALUE;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = MIN_VALUE;
int n = Integer.parseInt(reader.readLine());
if (n>0) {
for (int i = 0; i < n; i++) {
int num = Integer.parseInt(reader.readLine());
if (num > maximum) {
maximum = num;
}
}
}
if (maximum>0)
System.out.println(maximum);
else;
}
}