please help
package com.codegym.task.task04.task0441;
/*
Somehow average
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(r.readLine());
int b = Integer.parseInt(r.readLine());
int c = Integer.parseInt(r.readLine());
if (a >= b && a <= c || a<=b && a>=c){
System.out.println(a);
} else if (a >= b && a <= c || a<=b && a>=c) {
System.out.println(b);
} else if (a >= b && a <= c || a<=b && a>=c){
System.out.println(c);
}
}
}