#include #include #include #include using namespace std; int main() { vector s(6); for (auto &x : s) cin >> x; cout << (accumulate(s.begin(), s.end(), 0) - *max_element(s.begin(), s.end()) - *min_element(s.begin(), s.end())) / 4.0 << endl; }