package me.yukicoder.lv1; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class No0394 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String[] str = br.readLine().split(" "); double[] score = new double[str.length]; for (int i = 0; i < str.length; i++) { score[i] = Double.parseDouble(str[i]); } Arrays.sort(score); double avg = (Arrays.stream(score).sum() - score[0] - score[str.length - 1]) / (str.length - 2); System.out.printf("%.2f\n", avg); } catch (IOException e) { e.printStackTrace(); } } }