#include<stdio.h>
int main() {
int val[7], sum = 0;
double ave;
while (scanf("%d %d %d %d %d %d %d", &val[0], &val[1], &val[2], &val[3],
&val[4], &val[5], &val[6]) != EOF) {
int max = val[0], min = val[0]; //初始化最大最小值为第一个数
for (int i = 0; i < 7; i++) {
if (val[i] > max) max = val[i]; //判断最大值
if (val[i] < min) min = val[i]; //判断最小值
sum += val[i]; //求和
}
ave = (sum - max - min) / 5.0; //求平均值
sum = 0; //初始化和值
printf("%.2f\n", ave);
}
return 0;
}
int main() {
int val[7], sum = 0;
double ave;
while (scanf("%d %d %d %d %d %d %d", &val[0], &val[1], &val[2], &val[3],
&val[4], &val[5], &val[6]) != EOF) {
int max = val[0], min = val[0]; //初始化最大最小值为第一个数
for (int i = 0; i < 7; i++) {
if (val[i] > max) max = val[i]; //判断最大值
if (val[i] < min) min = val[i]; //判断最小值
sum += val[i]; //求和
}
ave = (sum - max - min) / 5.0; //求平均值
sum = 0; //初始化和值
printf("%.2f\n", ave);
}
return 0;
}