#include <stdio.h>

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


    }
    return 0;
}