Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	return n
}

func main() {
	sc.Split(bufio.ScanWords)

	sum := 0
	for i := 0; i < 5; i++ {
		x := nextInt()
		if x < 40 {
			sum += 40
		} else {
			sum += x
		}
	}
	fmt.Println(sum / 5)
}

Python: sum = 0
for i in range(5):
    score = int(input())
    if score <40:
        score = 40
    sum += score
print(sum//5)

Python: s=0

for i in range(5):
    a=int(input())
    if a <40:
        a=40
    s+=a

print(s//5)

Python: t=0
for i in range(5):
    s=int(input())
    if s<40:s=40
    t+=s
print(t//5)

Python: print(sum([max(int(input()),40) for _ in range(5)]) // 5)

Python: lst=[]
for i in range(5):
    x=int(input())
    if x<40:
        x=40
    lst.append(x)
print(sum(lst)//5)

Python: x=[]
for i in range(5):
    s=int(input())
    if s<40:
        s=40
    x.append(int(s))
total=sum(x)
ave=total/5
print(int(ave))

Python: a=0
for i in range(5):
    b=int(input())
    if b<40:b=40
    a+=b
print(a//5)

Python: a = []
for i in range(5):
    n = int(input())
    if n < 40:
        n = 40
    a.append(n)
A = sum(a) / 5
print(int(A))

Python: print(sum([max(40,int(input())) for _ in range(5)])//5)

Python: a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

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
print((a+b+c+d+e)//5)

Python: s = 0
for i in range(5):
    p = int(input())
    if p < 40:
        s += 40
    else:
        s += p
print(s//5)

Python: a=int(input())
if a<40:
    a=40
    
b=int(input())
if b<40:
    b=40
    
c=int(input())
if c<40:
    c=40
    

d=int(input())
if d<40:
    d=40
    

e=int(input())
if e<40:
    e=40
    

print(int((a+b+c+d+e)/5))

Python: N=5
sum=0
for _ in range(N):
    i=int(input())
    if 40<i:
        sum=sum+i
        
    else:
        i=40
        sum=sum+40
print(sum//5)

Python: def main():
    a = []
    for _ in range(5):
        hoge = int(input())
        if hoge < 40:
            hoge = 40
        else:
            pass
        a.append(hoge)

    total = 0
    for score in a:
        total += score

    print(total // 5)


if __name__ == "__main__":
    main()

Python: s = 0
for i in range(5):
    p = int(input())
    if p <= 40 :
        p=40
    s+=p
print(s//5)

Python: sum = 0
for i in range(5):
 a = int(input())
 if a <= 40: a = 40
 sum += a
print(sum//5)

Python: a = [int(input()) for _ in range(5)]
b = [a if a >= 40 else 40 for a in a]
print(sum(b) // 5)

Python: scores = []
for _ in range(5):
    score = int(input())
    if score < 40:
        scores.append(40)
    else:
        scores.append(score)
print(sum(scores)//5)

Python: s=0
for i in range(5):
    a=int(input())
    if a>=40:
        s+=a
    else:
        s+=40
print(int(s/5))

Python: sum=0
for i in range(5):
    a=int(input())
    for j in range(5):
        if a<40:
            a=40
        else:
            a=a
    sum+=a
    

print(int(sum/5))

Python: from statistics import mean

score = [int(input()) for i in range(5)]
score = [score[i] if score[i] >= 40 else 40 for i in range(5)]

print(mean(score))

Python: 
a=[0]*5
for i in range(5):
    a[i] = int(input())
    if a[i]<=40:
        a[i]=40
print(sum(a)//5)

Python: s = 0
for i in range(5):
	a = int(input())
	if a < 40: a = 40
	s += a
print(s//5)

Python: l=[]
for i in range(5):
    n=int(input())
    if n>40:
        l.append(n)
    else:
        l.append(40)
ave = sum(ｌ) / 5
print(int(ave))

Python: a = 0
for i in range(5) :
    b = int(input())
    if b < 40 :
        a += 40
    else :
        a += b
print(a // 5)

Python: s=0
for i in range(5):
    ai=int(input())
    if ai<40:
        ai=40
    s+=ai
print(s//5)

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <random>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int a,b,c,d,e; cin >> a >> b >> c >> d >> e;
	cout << (max(a,40)+max(b,40)+max(c,40)+max(d,40)+max(e,40))/5 << endl;
}

C++: #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;
}
cout<<(a+b+c+d+e)/5<<endl;
return 0;
}

C++: #include <cstdio>
#include <utility>
#include <algorithm>
using namespace std;

#define gcu getchar_unlocked
int in(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;}
int in() {return in(gcu());}
bool scan(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
bool scan(char &c){c=gcu();gcu();return c!=EOF;}
//bool scan(string &s){int c;s="";
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
template <typename head, typename... tail>
bool scan(head &h, tail&&... t){return scan(h) && scan(t...);}
#define pcu putchar_unlocked
#define vo inline void out
template <typename T>
vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
vo(const char *s){while(*s)pcu(*s++);}
vo(char c){pcu(c);}
//vo(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail> vo(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T> vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef vo

int main() {
	int sum = 0;
	for (int i = 5; i; i--)
		sum += max(40, in());
	out(sum / 5, '\n');
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
#define INF LLONG_MAX
typedef long long ll;

int tensu(int k)
{
	int score, sum = 0;
	rep(i, k)
	{
		cin >> score;
		if(score<40) sum += 40;
		else sum += score;
	}
	return sum;
}

int ave(int sum, int n)
{
	return sum/n;
}

int main(void)
{
	int score_sum = tensu(5);
	int ans = ave(score_sum, 5);
	cout << ans << endl;
	return 0;
}

C++: #include<stdio.h>
int main()
{
int a,i,sam=0;
for(i=0;i<5;i++){
scanf("%d",&a);
if(a<40){
a=40;
}
sam=a+sam;
}
printf("%d\n",sam/5);
return(0);
}

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

int main(){
	int a,b=0;
	for(int i=0;i<5;i++){
		cin >> a;
		if(a<=40){
			b+=40;
		}else{
			b+=a;
		}
	}
	cout << b/5 << "\n" ;
	return 0;
}

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

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

C++: #include <bits/stdc++.h>

using namespace std;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair
#define each(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 24;

int main(void){
    vi a(5);
    for(; cin >> a[0];){
        range(i, 1, 5) cin >> a[i];

        int sum = 0;
        rep(i, 5){
            sum += max(40, a[i]);
        }

        cout << sum / 5 << endl;
    }

	return 0;
}