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

using namespace::std;

int main() {
	vector<int> dishes(5); 
	cin >> dishes[0];
	cin >> dishes[1];
	cin >> dishes[2];
	cin >> dishes[3];
	cin >> dishes[4];

	int ans = 0;
	int max_diff=0;
	for (int i = 0; i < dishes.size; i++) {
		int time = ceil(dishes[i]);
		max_diff = max(max_diff, time - dishes[i]);
		ans += time;
	}
	ans = ans - max_diff;

	cout << ans << endl;
	return 0;
}