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 <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define POF pop_front
#define POB pop_back
#define MA make_pair
#define ll long long
#define VE vector<int>
#define VP vector<pair<int,int> >
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
int main(){
  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;
  return 0;
}

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

int main(){
int t[10],al=0;
for(int i=0;i<5;i++){
cin>>t[i];
if(t[i]<40){t[i]=40;}
al+=t[i];
}
cout<<al/5<<endl;

return 0;
}

C++: #include<stdio.h>

int main(){
int s=0,x;
for(inti=0;i<5;i++)
{scanf("%d",&x);if(x<40)x=40;s+=x;}

printf("%d\n",x/5);
return 0;
}

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

int a,sum=0;
int main(){
int i;
for( i = 0; i < 5; i++ ){
cin >> a;
sum += a + min(a-40,0);
}
cout << sum/5 << endl;
return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<30
#define pb push_back
#define mp make_pair

using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int main() {
	int n = 5;
	vector<int> v(n);
	rep(i, n) cin >> v[i];

	int sum = 0;
	rep(i, n) {
		if(v[i] < 40) v[i] = 40;
		sum += v[i];
	}

	cout << sum / 5 << endl;

	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
#include<climits>
#include<stack>
#include<queue>
#include<cmath>
#define int long long
#define INF 100000000000
#define EPS 0.0000000001

using namespace std;

signed main() {
	int sc[6] = { 0 };
	int ans = 0;
	for (int i = 0; i < 5; i++) {
		cin >> sc[i];
		if (sc[i] <= 40)sc[i] = 40;
		ans += sc[i];
	}
	cout << ans/5 << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

#define MAX(a,b) ((a)>(b)?(a):(b))

int main()
{
    int total=0;
    int p;

    for(int i=0; i<5; ++i) {
        cin >> p;
        total+=MAX(p,40);
    }
    cout << total/5 << endl;
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>

using namespace std;

#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(a,x,b) ((a)<=(x)&&(x)<=(b))
#define ALL(v) (v).begin(), (v).end()
#define LENGTHOF(x) (sizeof(x) / sizeof(*(x)))
#define AFILL(a, b) fill((int*)a, (int*)(a + LENGTHOF(a)), b)
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define INF 1 << 30
#define EPS 1e-10

typedef pair<int, int> pi;
typedef pair<int, pi> pii;
typedef vector<int> vi;
typedef queue<int> qi;
typedef long long ll;

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

C++: #include<iostream>
using namespace std;
int main(){
int sum=0,ten[5];
for(int i=0;i<5;i++){
cin>>ten[i];
if(ten[i]<40)ten[i]=40;

sum+=ten[i];
}
cout<<sum/5<<endl;

return 0;
}

C++: #include <stdio.h>

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

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

int n, a;

int main()
{

    for (int i = 0; i < 5; i++)
    {
        cin >> a;
        if (a < 40)
            a = 40;
        n += a;
    }
    cout << n / 5 << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a, b, c, d, e;
    cin >> a;
    cin >> b;
    cin >> c;
    cin >> d;
    cin >> e;
    
    cout << (max(a, 40)+max(b, 40)+max(c, 40)+max(d, 40)+max(e, 40))/5 << endl;
    
}

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

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <stdlib.h>

using namespace std;

int main (void)
{
	int a[5],con;

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

	cout << con / 5 << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
const int mod=998244353,MAX=1<<18,INF=1<<30;

int main(){
vector<int> A(5);
int ans=0;
for(int i=0;i<5;i++){
cin>>A[i];
A[i]=max(A[i],40);
ans+=A[i];
}
cout<<ans/5<<endl;

}

C++: #include<iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <cmath>
#include <set>
#include <string.h>
#include <functional>

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<<(s+b+c+d+e)/5<<endl;
    return 0;
}

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

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

int main(){
    int A[5];
    for(int i=0; i<5; i++){
        cin >> A[i];
        if(A[i]>40) continue;
        else A[i] = 40;
    }
    
    int sum=0;
    for(int j=0; j<5; j++){
        sum += A[j];
    }
    
    cout << sum/5 << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
    int p = 0;
    for (int i = 0; i < 5; i++) {
        int t;
        cin >> t;
        if (t < 40) t = 40;
        p += t;
    }
    cout << p / 5 << "\n";
    return 0;
}

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

int main()
{
    int a[5],ans;
    while(cin>>a[0])
    {
        if(a[0]<40) a[0] = 40;
        for(int i=1;i<5;i++) {scanf("%d",&a[i]);if(a[i]<40) a[i] = 40;}
        ans = a[0]+a[1]+a[2]+a[3]+a[4];
        cout<<ans/5<<endl;
    }
    return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
cin.tie(0);
   	ios::sync_with_stdio(false);

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

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

int main(){
	int ave=0;
	for(int i=0;i<6;i++){
		int a;
		scanf("%d",&a);
		ave+=max(40,a);
	}
	printf("%d\n",ave/6);
}