#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define N 1000 #define re(i,n) for(int i=0;i<(n);i++) #define rep(i,a,b) for(int i=(a);i<(b);i++) #define fe(i,n,f) for_each(i,n,f) #define bw(a,b,c) (((a)<=(b))&&((b)<=(c))) using namespace std; typedef long long ll; typedef unsigned long long ull; int main(void){ valarray a(6); re(i,6)cin>>a[i]; cout<<(double)(a.sum()-a.min()-a.max())/4.0<