#include<stdio.h>
//方法二(分别进行判断)
int main()
{
int s = 0;
int n = 0;
int max = 0;
int min = 100;c
int sum = 0;
while ((scanf_s("%d",&s))==1)
{
n++;
if (s > max)
{
max = s;
}
if (s < min)
{
min = s;
}
sum = sum + s;
if (n == 7)
{
printf(".2lf\n", (sum - max - min) / 5.0);
max = 0;
min = 100;
s = 0;
sum = 0;
}
}
return 0;
}