package com.javarush.task.task04.task0419; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; /* Максимум четырех чисел */ public class Solution { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int d = scanner.nextInt(); if (a > b) { if (a > c) if (a > d) System.out.println(a); } else if (b > c) { if (b > d) System.out.println(b); } else if (c > d) System.out.println(c); else System.out.println(d); } }