#include <stdio.h>
int main(){
	int i,score[5],sum,ave;
	for(i = 0;i < 5;i++){
		scanf("%d",&score[i]);
		if(score[i] < 40){
			sum += 40;
		}else{
		sum += score[i];
		}
	}
	ave = sum / 5;
	printf("%d\n",ave);
	return 0;
}