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++: //14-1 ?????????
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
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;
    int ans =(a+b+c+d+e)/5;
    cout << ans << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main ()
{
	int a[3000],con;

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

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

C++: #include <iostream>

using namespace std;

int main(){

	int test;
	int sum = 0;

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

	cout << sum / 5 << endl;

	return 0;
}

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

#include <iostream>
using namespace std;

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),n.end()
#define PI acos(-1)
using namespace std;
int main(){
  int sum=0;
  int tmp;
  rep(i,5){
    cin>>tmp;
    if(tmp>=40)sum+=tmp;
    else sum+=40;
  }
  cout<<sum/5<<endl;


}

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

C++: 
#include<stdio.h>

int main (void){

    int point = 0;
    int total = 0;
    int avel = 0;

    int i;

    for(i=0;i<5;i++){
        scanf("%d",&point);
        if(point < 40){
            total += 40;
        }else{
            total += point;
        }
    }
    avel = total / 5;

    printf("%d\n",avel);

    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 SQ(x) ((x)*(x))
#define Mod(x, mod) (((x)+(mod)%(mod))
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define INF 1 << 30
#define EPS 1e-10
#define MOD 1000000007

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 res = 0;
  rep(i, 5){
    int x;
    scanf("%d", &x);
    if(x<40) x = 40;
    res += x;
  }
  printf("%d\n", res/5);
  return 0;
}

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

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

C++: #include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<functional>
#include<queue>
#include <iomanip>
#include<map>
#include<limits>
#include<cmath>
#include<algorithm>
#include<bitset>
#include<utility>
#include<complex>
#include<cstdlib>
#include<set>
#include<cctype>

#define DBG cerr << '!' << endl;
#define REP(i,n) for(int (i) = (0);(i) < (n);++i)
#define rep(i,s,g) for(int (i) = (s);(i) < (g);++i)
#define rrep(i,s,g) for(int (i) = (s);i >= (g);--(i))
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int i = 0;i < (n);i++)cerr << v[i] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {for(int aaa = 0;aaa < i;aaa++){for(int bbb = 0;bbb < j;bbb++)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()

using namespace std;

typedef long long ll;
typedef vector<int> iv;
typedef vector<iv> iiv;
typedef vector<string> sv;

int main()
{
	int ans = 0,tmp;
	
	REP(i,5)
	{
		cin >> tmp;
		tmp = max(40,tmp);
		ans += tmp;
	}
	
	cout << ans / 5 << endl;
	
	
	return 0;
}

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

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

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

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

int main() {
	int num[5],AvgSum=0;
	for (int i = 0; i <= 4; i++) {
		cin >> num[i];
	}
	for (int i = 0; i <= 4; i++) {
		if (num[i] < 40) {
			AvgSum += 40;
		}
		else {
			AvgSum += num[i];
		}
	}

	cout << AvgSum / 5 << endl;

	return 0;
}

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

	int F,G,H,I,J;
	cin >> F >> G >> H >> I >> J;

	int average;
	if(F < 40) F = 40;
	if(G < 40) G = 40;
	if(H < 40) H = 40;
	if(I < 40) I = 40;
	if(J < 40) J = 40;

	average = (F+G+H+I+J) / 5;

	cout << average << endl;


	/*
	int A,B,C,D,E;
	cin >> A >> B >> C >> D >> E;

	int answer;
	if(A < 0){
		answer = -A * C + D + B * E;
	}
	if(A > 0){
		answer = (B - A) * E;
	}
	cout << answer << endl;
	*/

	return 0;
}

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++: #include <iostream>

using namespace std;

int main ()
{
	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;
}

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

int main()
{
 int a,b,c,d,e;
 cin >>a>>b>>c>>d>>e;
 if(40>a)
    a=40;
 if(40>b)
    b=40;
 if(40>c)
    c=40;
 if(40>d)
    d=40;
 if(40>e)
    e=40;

 cout<<(a+b+c+d+e)/5;
 return 0;
}