#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>

using namespace std;

int main()
{
	vector<int> S(6);
	int min = 101;
	int max = 0;
	int sum = 0;
	for( int i = 0; i < 6; i++ ) {
		cin >> S[i];
		sum += S[i];
		min = std::min( S[i], min );
		max = std::max( S[i], max );
	}
	sum -= min;
	sum -= max;

	sum = sum * 25 ;
	cout << sum / 100 << "." << setw(2) << setfill('0') << sum % 100 << endl;


	return 0;
}