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 n1 = reader.readLine();
        int num1= Integer.parseInt(n1);
        String n2= reader.readLine();
        int num2 = Integer.parseInt(n2);
        String n3 = reader.readLine();
        int num3 = Integer.parseInt(n3);
        String n4 = reader.readLine();
        int num4 = Integer.parseInt(n4);
        Solution sl = new Solution();
        sl.Max(num1,num2,num3,num4);

    }
    void Max(int num1,int num2,int num3,int num4){
        if(num1>num2 && num1>num3 && num1>num4)
            System.out.println(num1);
        else if(num2>num1 && num2>num3 && num2>num4)
            System.out.println(num2);
        else if(num3>num1 && num3>num2 && num3>num4)
            System.out.println(num3);
        else if(num4>num1 && num4>num2 && num4>num3)
            System.out.println(num4);
        else if((num1==num2) && (num2==num3) && (num3==num4) && (num4==num1))
            System.out.println(num1);
    }
}