Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sum := 0.0
	for i := 0; i < 5; i++ {
		sc.Scan()
		s, _ := strconv.Atoi(sc.Text())
		sum += math.Max(float64(s), float64(40))
	}
	fmt.Println(int(sum / 5))

}

C++: #include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<functional>
#include<queue>
#include <iomanip>
#include<map>
#include<limits>
#include<cmath>
#include<algorithm>
#include<bitset>
#include<utility>
#include<complex>
#include<cstdlib>
#include<set>
#include<cctype>

#define DBG cerr << '!' << endl;
#define REP(i,n) for(int (i) = (0);(i) < (n);++i)
#define rep(i,s,g) for(int (i) = (s);(i) < (g);++i)
#define rrep(i,s,g) for(int (i) = (s);i >= (g);--(i))
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int i = 0;i < (n);i++)cerr << v[i] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {for(int aaa = 0;aaa < i;aaa++){for(int bbb = 0;bbb < j;bbb++)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()

using namespace std;

typedef long long ll;
typedef vector<int> iv;
typedef vector<iv> iiv;
typedef vector<string> sv;

int main()
{
	int ans = 0,tmp;
	
	REP(i,5)
	{
		cin >> tmp;
		tmp = max(40,tmp);
		ans += tmp;
	}
	
	cout << ans / 5 << endl;
	
	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int score, sum=0;
	for(int i=0; i<5; i++){
		scanf("%d", &score);
		if(score < 40)
			score = 40;
		sum += score;
	}
	
	int ave = sum / 5;
	
	printf("%d", ave);
	
	return 0;
}

C++: #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",ave);
	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
	int num[5],AvgSum=0;
	for (int i = 0; i <= 4; i++) {
		cin >> num[i];
	}
	for (int i = 0; i <= 4; i++) {
		if (num[i] < 40) {
			AvgSum += 40;
		}
		else {
			AvgSum += num[i];
		}
	}

	cout << AvgSum / 5 << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){

	int F,G,H,I,J;
	cin >> F >> G >> H >> I >> J;

	int average;
	if(F < 40) F = 40;
	if(G < 40) G = 40;
	if(H < 40) H = 40;
	if(I < 40) I = 40;
	if(J < 40) J = 40;

	average = (F+G+H+I+J) / 5;

	cout << average << endl;


	/*
	int A,B,C,D,E;
	cin >> A >> B >> C >> D >> E;

	int answer;
	if(A < 0){
		answer = -A * C + D + B * E;
	}
	if(A > 0){
		answer = (B - A) * E;
	}
	cout << answer << endl;
	*/

	return 0;
}

C++: #include<iostream>
using namespase std;

int main(){

	int a,b,c,d,e;

cin >> a >> b >> c >> d >> e;

	int m=0;

	if( a<40 ){
		m += 40;	
}
	else{
		m += a;
	}
	if( b<40 ){
		m += 40;
}
	else{
		m += b;
	}
	if( c<40 ){
		m += 40;
}
	else{
		m += c;
}
	if( d<40 ){
		m += 40;
}
	else{
		m += d;
}
	if( e<40 ){
		m += 40;
}
	else{
		m += e;}


cout << m/5 << endl;

return 0;


}

C++: #include <iostream>

using namespace std;

int main ()
{
	int a,con;

	for (int i = 0; i < 5; i++)
	{
		cin >> a;
		if (a < 40)
		{
			a = 0;
			a = 40;
		}
		con += a;
	}

	cout << con / 5 << endl;
}

C++: #include<iostream>
using namespace std;

int main()
{
 int a,b,c,d,e;
 cin >>a>>b>>c>>d>>e;
 if(40>a)
    a=40;
 if(40>b)
    b=40;
 if(40>c)
    c=40;
 if(40>d)
    d=40;
 if(40>e)
    e=40;

 cout<<(a+b+c+d+e)/5;
 return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <array>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>

#define INF 1000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(int i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)
#define vint vector<int>
#define vvint vector<vector<int>>
#define vsort(x) sort(x.begin(),x.end())

using int64 = uint64_t;

using namespace std;

int main() {
	int x;
	int sum = 0;
	rep(i, 0, 5) {
		cin >> x;
		sum += max(40, x);
	}
	cout << sum/5 << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
   int a,b,c,d,e,f;
   cin>>a>>b>>c>>d>>e;
   f =(a+b+c+d+e)/5;
   cout<<f<<endl;
}

C++: #include <stdio.h>

int main(){
    int point[5];
    int i,ave=0;
    for(i=0;i<5;i++){
	scanf("%d",&point[i]);
	if(point[i]<40){
	    point[i]=40;
	}
	ave += point[i];
    }
    ave= ave/5;
    printf("%d\n",ave);
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int sum = 0, v;
    for (int i = 0; i < 5; i++) {
        cin >> v;
        sum += v < 40 ? 40 : v;
    }
    cout << sum / 5 << endl;

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){

	int a, b, c, d, e;
	cin>>a>>b>>c>>d>>e;
	if(a<40) a=40;
	if(b<40) b=40;
	if(c<40) c=40;
	if(d<40) d=40;
	if(e<40) e=40;

	cout<<(a + b + c + d + e) / 5<<endl;

	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
  int n=0,sum=0,x;
  while(cin >> x) {
    if(x<=40) x=40;
    sum+=x;
    n++;
  }
  cout << sum/n << endl;
  return 0;
}

C++: #include<cstdio>
#include<iostream>
int main(){
    int x[5],sum=0;
    for(int i=0;i<5;i++){
        scanf("%d",&x[i]);
        if(x[i]<40)
            x[i]=40;
        sum+=x[i];
    }
    printf("%d\n",sum/5);
    return 0;
}

C++: #include<iostream>
using namespace std;
int i, p, sum = 0;
int main(){
for (i=1; i<=5; i++){
    cin >> p;
    if(p < 40) { p = 40; }
   sum += p;
}
cout << sum / 5 << endl;
return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
    int a[6],all=0;
    for(int i=0;i<5;i++){
        cin>>a[i];
        if(a[i]<40)a[i]=40;
        all+=a[i];
    }
    cout<<all/5<<endl;
}

C++: #include <cstdio>

int main() {
	int n, s;
	for(int i = 0; i < 5; i++) {
		scanf("%d", &n);
		if(n < 40)
			n = 40;
		s += n;
	}
	printf("%d", s/5);
	return 0;
}

C++: i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);}

C++: /*#include <iostream>
using namespace std;
int main(){
	
	int a,b,c,d,e;
	cin >> a >> b >> c >> d >> e;
	int answer = -a * c + d + b * e;
	if (a < 0) {
		answer = -a *c + d + b * e;
	}
	if (a>0) {
		answer = ( b - a )* e;
	}
	cout << answer << endl;
	
}*/

#include <iostream>
using namespace std;
int main(){
	
	int a, b, c, d, e;
	cin >> a >>b >>c >>d >>e;
	if (a <=40) {
		a= 40;

	}
	if (b <= 40) {
		b=40;
	}
	if (c<= 40 ) {
	c= 40;
	}
	if ( d <= 40 ) {
		d=40;
	}
	if (e<= 40 ) {
	e= 40;
	}
	int answer = (a+b +c +d + e)/ 5;
	cout << answer << endl;

	return 0;

}

C++: #include<stdio.h>
int main(void)
{
	int a,i,h,m;
	int t[5];
	
	for(i=1;i<=5;i++){
		scanf("%d",&t[i]);
		if(t[i]<40){
			t[i]=40;
		}
		a+=t[i];
		h=a/5;
		
	}		
	printf("%d",h);
	return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
  int x, sum;

  sum = 0;

  for (int i = 0; i < 5; i++){
    cin >> x;
    if (x < 40){
      x = 40;
    }
    sum += x;
  }

  cout << sum / 5 << endl;

  return 0;
}

C++: #include <stdio.h>
#include <cctype>
#include <limits.h>
#include <math.h>
#include <complex>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) static_cast<bitset<16> >(x);
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 1000000000;
const double EPS = 1e-8;
const double PI = 3.14159;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0592 : Average Score **/
int main()
{
	int N=0;
	rep(i, 5) {
		int a; cin>>a;
		N += max(40, a);
	}
	cout << N/5 << endl;
}