Beginners contest: Loops - 2

Average value - 1

The project "The average weight of a high school student" was solved by Mammad and Samed. What they will do with this number, they do not tell. They asked to weigh all the pupils of the school and put the results into the table. Help them to calculate the average weight of the students. But they ask that the students with the biggest and the smallest weight should not be considered. Their only omission, they did not calculate the total number of students, but this, of course, does not prevent you from calculating what they are asking for.


In a few lines, the weights of students are given in kilograms, separated by spaces (one or more) or by the end of line character. Read the weights of the students until the end of the input.


Print the average weight of pupils in the school without taking into account the students with the largest and smallest weight. Print the answer rounded to kilograms.

Time limit 1 second
Memory limit 128 MiB
Input example #1
40   23 27
  59 68 23    84   27
53 46   
Output example #1
Source 2018 Azerbaijan School Competition, II Stage, April 8, Problem K