#include <stdio.h>

int main() {

    int n = 0;
    float sum = 0;
    int count = 0;
    int max = 0;
    int min = 100;
    while (scanf("%d", &n) != EOF)
    //遍历
    {
        if (n > max)//判断
        {
            max = n;
        }

        if (n < min)
        {
            min = n;
        }

        sum += n;
        count++;

        if (count == 7)//分组
        {
            printf("%.2f\n", (sum - min - max) / 5.0);
            count = 0;//重置
            max = 0;
            min = 100;
            sum = 0;
        }
    }
    return 0;
}