#include <bits/stdc++.h>
using namespace std;
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	vector<int> vc(6);
	for( auto&& x : vc )
	{
		cin >> x;
	}
	sort( vc.begin(), vc.end() );
	cout << fixed << setprecision(2) << accumulate( vc.begin() + 1, vc.end() - 1, 0 ) / 4.0 << endl;
	return 0;
}