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 <cstdio>
#include <algorithm>
using namespace std;

int sum=0, tmp;

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

	return 0;
}

C++: #include <cstdio>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <stack>
#include <algorithm>
#include <random>
#include <iomanip>
#include <map>
#include <queue>
#include <functional>
#include <numeric>
#include <chrono>
#include <cstdlib>
using ll = long long;
using namespace std;

const ll MOD = 1e9 + 7;
const double pi = acos(-1);
typedef pair<int, int> P;
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define EPS 1e-4
#define OUTPUT(i) (cout << (ll)i << endl)
#define ALL(a) ((a).begin(), (a).end())

bool operator<(const pair<ll, ll> &a, const pair<ll, ll> &b)
{

    if (a.first == b.first)
        return a.second < b.second;

    return a.first < b.first;
}

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

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

    //cout << fixed << setprecision(15);

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

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

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

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

C++: #include<iostream>

int main{
  int a[5];
  int b;
  for(int i; i<5; i++){
    cin>>a[i];
    b=b+a[i];
      }
  cout<<b/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;
		}
		else
		{
		}
		con += a[i];
	}

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

C++: #include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

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

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c,d,e,f,g,h,i,j,k;
	float A;
	cin>>a>>b>>c>>d>>e;
	A=b-d;
	g=0;
	g++;
	for (;;)
	{
		A=A-d;
		if (A<=0)
		{
			g++;
			break;
		}
		else if (A>0)
		{
			g++;
		}
	}
	A=c-e;
	f=0;
	f++;
	for (;;)
	{
		A=A-e;
		 if (A<=0)
		{
			f++;
			break;
		}
		else if (A>0)
		{
			f++;
		}
	}
	if (f<=g)
	{
		g=a-g;
		cout<<g<<endl;
	}
	else if(f>=g)
	{ 
		f=a-f;
		cout<<f<<endl;
	}
	return 0;
}

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