Скиньте пожалуйста более адекватное решение, мне не понравилось мое а в голову больше не приходит)
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
if (a==b ||b==c) {System.out.println(b); }
else if (c==a ||c==b) {System.out.println(c); }
else if (b > a && c > b || b > c && a > b) {
System.out.println(b);
} else if (a > b && c > a || a>c && b>a) {
System.out.println(a);
} else if (c > a && b > c || c>b && a>c) {
System.out.println(c);
}
}