#include<iostream>
using namespace std;
int main(){
	int sc[5];
	int sm = 0;
	for(int i = 0;i < 5;i++){
		cin >> sc[i];
		if(sc[i] < 40){sc[i] = 40;}
		sm += sc[i];	
	}
	cout << sm/5 << endl;
	return 0;
}
