Judging Olympia

No attempts yetTime limit1sMemory limit128 MB

Problem

A panel of six judges evaluates each contest submission. Instead of each judge grading a single aspect, every judge assigns one overall grade out of ten, taking all six aspects into account together: correctness, robustness, overall design, clarity, coding style, and maintainability.

To keep the judging impartial, the final grade of a submission is the average of the six grades after discarding exactly two of them: the single highest grade and the single lowest grade. This way, any judge who inflates or deflates a particular team's grade risks having that grade thrown out.

Write a program that prints the final grade of a submission.

Input

The input contains one or more test cases. Each test case is a single line listing the six grades given by the judges. Each grade is an integer from 0 to 10. The input ends with a dummy test case in which all six grades are zero; this terminating line is not processed.

Output

For each test case, print the final grade on its own line. Print it without unnecessary trailing zeros or decimal points: print a whole number when the result is an integer (for example 6), and otherwise print the exact value (for example 5.5).