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>
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++: // Average Score

#include <iostream>
#include <vector>

using namespace std;

int main()
{
  vector<int> exam;
  int i, x, ave = 0;

  for (i = 0; i < 5; i++) {
    cin >> x;
    exam.push_back(x);
  }

  for (i = 0; i < 5; i++) {
    if (exam[i] < 40) {
      ave += 40;
    } else {
      ave += exam[i];
    }
  }

  ave /= exam.size();

  cout << ave << endl;

  return 0;
}

C++: #include <stdio.h>

int main() {
 int i, data[5], sum = 0, average = 0;
 for( i = 0; i < 5; i++ ) {
   scanf( "%d", &data[i] );
 }
 for( i = 0; i < 5; i++ ) {
   if( data[i] < 40 ) {
     data[i] = 40;
   }
   sum += data[i];
 }
 average = sum / 5;
 printf( "%d\n", average );
 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;
  }
  ret /= 5;
  cout << ret << endl;
  return 0;
}

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

int main(){


  int sum=0;
  int point;

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

  cout << sum/5 << endl;

  return 0;
}

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

int main(){

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


  return 0;
}

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

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

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

using namespace std;

#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

int main() {
	int total = 0;
	int point;
	rep(i, 5) {
		scanf("%d", &point);
		total += (point >= 40) ? point : 40;
	}
	printf("%d\n", total / 5);
	return 0;
}

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

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

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

int main(){
  int n, ans = 0;
  for(int i=0;i<5;i++){
    cin >> n;
    ans += n<40?40:n;
  }

  cout << ans/5 << endl;
}

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

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

int main(){
  int a, b, c, d, e ,sum;
  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;

  sum = (a + b + c + d + e) / 5;

  cout << sum << endl;
}

C++: #include <iostream>

using namespace std;

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

	return 0;
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int sum = 0;
	for(int i = 0; i < 5; ++i){
		int score;
		cin >> score;
		if(score < 40)
			score = 40;
		sum += score;
	}
	
	cout << sum / 5 << endl;
		
	return 0;
}

C++: ans = 0
for i in range(5):
    ans += max(40,int(input())) // 5
print(ans)

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

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

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

C++: #include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;

int main()
{
	vector<int> a(5);
	for(int i=0; i<5; ++i){
		cin >> a[i];
		a[i] = max(a[i], 40);
	}
	cout << (accumulate(a.begin(), a.end(), 0) / 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<iostream>
int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=a;}printf("%d\n",s/5);}

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

C++: #include<iostream>
using namespace std;
int main(){
	
	int a,b,c,d,e,f,x;

	cin>>a;
	cin>>b;
	cin>>c;
	cin>>d;
	cin>>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 <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <ostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define INF 1000000000
#define rep(i,a,b) for (int i=(a);i<(b);i++)
#define rev(i,a,b) for (int i=(a)-1;i>=b;i--)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef queue<int> qi;
typedef vector<int> vi;
typedef vector<string> vs;
int dx[4] = { 0, 1, 0, -1 };
int dy[4] = { 1, 0, -1, 0 };

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

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

	return 0;
}

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

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

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

	int a, b, c, d, e, f;

	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;

	f = (a + b + c + d + e) / 5;

	cout << f << endl;

}