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)
}

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;
		if (a < 40)
		{
			a = 0;
			a = 40;
		}
		con += a;
	}

	cout << con / 5 << endl;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	int ans = 0;
	for (int i = 0; i < 5; i++) {
		int x; cin >> x;
		ans += max(x, 40);
	}
	cout << ans / 5 << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
  int data;
  int sum = 0;
  for(int i = 0; i < 5; i++) {
    cin >> data;
    if(data < 40)data = 40;
    sum += data;
  }
  cout << data / 5 << endl;
  return 0;
}

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 <iostream>
using namespace std;

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

C++: #include<bits/stdc++.h>
int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}printf("%d\n",s/5);}

C++: #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define enld '\n'
#define rep(i,n) for(int i=0; i<(n); i++)
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast")
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[6] = {1, 0, -1, 0,1,1};
const int dy[6] = {0, 1, 0, -1,1,-1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
// ---------------------------------------------------------------------------

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int sum = 0;
    for(int i=0; i<5; i++){
        int a;
        cin >> a;
        sum += max(a,40);
    }
    cout << sum/5 <<enld;
    return 0;
}

C++: #include <iostream>

using namespace std;

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

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 <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<stdio.h>
int main(void)
{
	int a,b,c,d,e,f,x;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&f);
	x=(a+b+c+d+f)/5;
	printf("%d\n",x);
	return 0;
}

C++: #include<iostream>
using namespace std;
int t;
int j;
int s;
int h;
int n;
int main(){
	cin >> t;
	cin >> j;
	cin >> s;
	cin >> h;
	cin >> n;
	if (t < 40){
		t = 40;
	}
	if (j < 40){
		j = 40;
	}
	if (s < 40){
		s = 40;
	}
	if (h < 40){
		h = 40;
	}
	if (n < 40){
		n = 40;
	}
	cout << (t + j + s + h + n) / 5 << endl;

	return 0;
}

C++: #include<cstdio>
using namespace std;
int main(void)
{
	int a[5],gou,hei,i;
	gou=0;
	for(i=0;i<5;i++){
		scanf("%d",&a[i]);
		if(a[i]<40){
			a[i]=40;
		}
		gou+=a[i];
	}
	hei=gou/5;
	printf("%d\n",hei);
	return 0;
}

C++: #include<cstdio>

int main(void){
	int p, buf, i;
	scanf("%d", &p); p=(p<40)?40:p;
	for(i=0; i<4; ++i){ scanf("%d", &buf); p+=(buf<40)?40:buf; }
	printf("%d\n", p/5);
	return(0);
}

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

int main()
{
	int sum = 0;
	for(int i = 0; i < 5; i++) {
		int p;
		cin >> p;
		sum += max(p, 40);
	}

	cout << sum / 5 << endl;
}

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;
sum += a;
}
cout << sum/5 << "\n";
return 0;
}

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

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
        int N =5;
        vector<int>             v(N);

        rep(i, N) {
                cin >> v.at(i);
                if (v.at(i) < 40) v.at(i) = 40;
        }

        int sum = accumulate(v.begin(), v.end(), 0);
        cout << sum / v.size() << endl;
        return 0;
}

C++: #include<iostream>
using namespace std;
int a[5];
int result;

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

C++: #include <stdio.h>

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

    printf("%d", s / 5);
}

C++: #include<iostream>

using namespace std;


int main(void){

	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>

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

C++: #include<iostream>
int a,s;main(){for(i=0;i<5;i++){std::cin>>a;s+=a;}printf("%d\n",s/5);}

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

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

C++: n,k=5;main(m){for(;k--;n+=m<40?40:m)scanf("%d",&m);k=!printf("%d\n",n/5);}

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

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

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

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

	printf("%d\n", ans/5);
	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,con;

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

	cout << con / 5 << endl;
return 0;
}

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

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

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