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 reader = new BufferedReader(new InputStreamReader(System.in)); String num1 = reader.readLine(); String num2 = reader.readLine(); String num3 = reader.readLine(); int one = Integer.parseInt(num1); int two = Integer.parseInt(num2); int three = Integer.parseInt(num3); //if num is not greater than x or not less than x print num if (one <= two && two <= three || three <= two && two <= one) { System.out.print(two); } else if (two <= one && one <= three || three <= one && one <= two) { System.out.print(one); } else if (one <= three && three <= two){ System.out.print(three); } else { System.out.print(three); } } }