Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)
	sum := 0
	for i := 0; i < 5; i++ {
		score := nextInt()
		if score < 40 {
			sum += 40
		} else {
			sum += score
		}
	}
	// fmt.Println(sum)
	fmt.Println(sum / 5)
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <array>
#include <vector>

using namespace std;

int main() {

  int sum = 0;
  for ( int i = 0; i < 5; i++ ){
	int val;
	cin >> val;
	sum += val;
  }
  cout << ( sum / 5 ) << endl;
}

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;
		}
		
		con += a[i];
	}

	cout << con / 5 ;
}

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

int main()
{
	int ta,ji,sa,si,ha;

	cin >> ta;
	if (ta<40)
		ta=40;
	cin >> ji;
	if (ji<40)
		ji=40;
	cin >> sa;
	if (sa<40)
		sa=40;
	cin >> si;
	if (si<40)
		si=40;
	cin >> ha;
	if (ha<40)
		ha=40;




	cout << (ta+ji+sa+si+ha)/5 << endl;

	return 0;
}

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

int main(void){

  int buf,res=0;

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

  res /= 5;

  cout << res << endl;
  
  return 0;
}

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

using namespace std;
int t,ans;
int main(){
	for(int i = 0;i < 5;i++)cin>>t,ans+=max(40,t);
	cout << ans/5 << endl;
}

C++: //============================================================================
// Name        : AOL.cpp
// Author      : Akari Fujii
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#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;
}

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

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  int ret = 0;
  int t;
  REP(i,5){
    cin >> t;
    ret += t;
  }
  t /= 5;
  cout << t << endl;
  return 0;
}

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

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

int score[5], total = 0, ave;
int main()
{
  for(int i = 0; i < 5; i++) cin >> score[i];
  for(int i = 0; i < 5; i++) total += (score[i] < 40) ? 40 : score[i];
  ave = total / 5;
  cout << ave << endl;
  return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
using namespace std;
int main() {
	long long n, ans = 0; 
	for (int h = 0; h < 5; h++) {
		cin >> n;
		if (n > 40) {
			ans += n;
		}
		else {
			ans += 40;
		}
	}
	cout << ans / 5 << endl;
}

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

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