#include <stdio.h> #include<math.h> int main() { int a, b,c,d,e,f,g,i; double s; int max(int x,int y); int min(int x, int y); while (scanf("%d %d %d %d %d %d %d", &a, &b,&c,&d,&e,&f,&g) != EOF) { int sum=a+b+c+d+e+f+g; int m1=max(max(a,b),max(c,d)); int m2=max(max(e,f),g); int ma=max(m1,m2); int mi=min(g, min( min( min(a,b),min(c,d) ),min(e,f))); s=(sum-ma-mi)/5.0; printf("%.2lf\n",s); } return 0; } int max(int x ,int y) { int z; if(x>y) z=x; else z=y; return z; } int min(int x,int y) { int z; if(x<y) z=x; else z=y; return z; }