BufferedReader reader = new BufferedReader(new InputStreamReader (System.in)); String str1 = reader.readLine(); String str2 = reader.readLine(); String str3 = reader.readLine(); String str4 = reader.readLine(); int a = Integer.parseInt(str1); int b = Integer.parseInt(str2); int c = Integer.parseInt(str3); int d = Integer.parseInt(str4); int max = 0; if (a >= b) max = a; if (b >= c) max = b; if (c >= d) max = c; if (d >= max) max = d; if(a == b || a == c || a == d) System.out.println(max);