Помогите пожалуйста
package com.javarush.task.task04.task0419;
/*
Максимум четырех чисел
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
int max = 0;
if (a > b && a > c && a > d ){
max = a;
}
if ( b > a && b > c && b > d ){
max = b;
}
if (c > b && c > a && c > d) {
max = c;
}
if (d > b && d > c && d > a ){
max = d;
}
if ( b == a || b == c || b == d || a == c || a == d || c == d ){
max = a;
}
System.out.println(max);
}
}