#include<stdio.h> int main() { int arr[7] = {0}; int i = 0, max = 0, min = 100, sum = 0; while (scanf("%d", &arr[i]) != EOF) { if (arr[i] > max) max = arr[i]; if (arr[i] < min) min = arr[i]; sum += arr[i]; i++; if (i == 7) { printf("%.2f\n", (sum - max - min) / 5.0); i = 0, max = 0, min = 100, sum = 0; } } return 0; }