package com.codegym.task.task04.task0419;
/*
Maximum of four numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String x = reader.readLine();
String y = reader.readLine();
String z = reader.readLine();
String v = reader.readLine();
int a = Integer.parseInt(x);
int b = Integer.parseInt(y);
int c = Integer.parseInt(z);
int d = Integer.parseInt(v);
if(a > b)
{
System.out.println(a);
}
else if(b > c)
{
System.out.println(b);
}
else if(c > d)
{
System.out.println(c);
}
else if(b > a)
{
System.out.println(b);
}
else if(c > b)
{
System.out.println(c);
}
else
{
System.out.println(d);
}
}
}