// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
    // Input
    vector<int> S(6);
    rep(i, 6) cin >> S[i];

    // Output
    sort(S.begin(), S.end());
    cout << fixed << setprecision(2);
    cout << accumulate(S.begin() + 1, S.end() - 1, 0.0) / 4.0 << endl;
}