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 = 0;
int num = Integer.parseInt(reader.readLine());
//write your code here
if(num>0)
{
for(int i=0;i<num;i++)
{
int n = Integer.parseInt(reader.readLine());
if (n > maximum )
{
maximum = n;
}
}
System.out.println(maximum);
}
}
}

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 = 0;
int num = Integer.parseInt(reader.readLine());
//write your code here
if(num>0)
{
for(int i=0;i<num;i++)
{
int n = Integer.parseInt(reader.readLine());
if (n > maximum )
{
maximum = n;
}
}
System.out.println(maximum);
}
}
}