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<vector>
#include<algorithm>

using namespace std;

int main ()
{
	int a,b,c,d,e,ss;
	
	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;
	ss=(a+b+c+d+e)/5;
	
	cout<<ss<<endl;
	
	
	
return 0;	
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define first F
#define second S

typedef vector<int> vi;
typedef pair<int,int> pii;

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

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

#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

int main(){
  double temp,sum=0;

  rep(i,5) { cin >> temp; if( int(temp) < 40 ) temp = 40; sum += temp; }
  printf("%.0f\n",sum/5);
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

  int total = 0, ten;
  for(int i = 0 ; i < 5 ; i++){
    cin >> ten;
    total += ten >= 40 ? ten : 40;
  }
  cout << total / 5 << endl;

  return 0;
}

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

int main()
{
    int a; int b; int c; int d; int 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 score = 0, n;
  for (int i = 0; i < 5; i++){
    cin >> n;
    if (n < 40){
      n = 40;
    }
    score += n;
  }
  cout << score / 5 << endl;
  return (0);
}

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

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

using namespace std;

main(){
	int a,b,c,d,e,f=0;
	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);
	f=f/5;
	printf("%d\n",f);
}

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

using namespace std;

#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define REP3(i, m, n) for(int i = m, i##_len=(n);i < i##_len;i++)
#define FORVEC(i, v) for(int i = 0;i < v.size();i++)

#define INF 1000000000
#define pb(a) push_back(a)
#define llong long long
#define vi vector<int>
#define P pair<int,int>
#define all(vec) (vec.begin()),(vec.end())

int main(){
	int a=0,buf;
	REP(i,5){
		cin>>buf;
		if(buf<40)buf=40;
		a+=buf;
	}
	cout<<a/5<<"\n";
	
	return 0;
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back
#define sz size()

const double EPS = 1e-10;
const int INF = 100000000;

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

    
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <string>
#include <algorithm>



using namespace std;


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

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>
using namespace std;

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

C++: #include <iostream> //以下のコードは、とても無駄が多いです。
using namespace std;

int main(){

int tokuten;
int goukei;
goukei = 0;
int i;

for ( i =0 ; i <5 ; i = i+1 ){
	cin>>tokuten;
		if(tokuten<40){ tokuten =40; }
		goukei = goukei + tokuten;
}

cout <<goukei / 5 <<endl ;

return 0;
}

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

int main() {
  int t, sum = 0;
  for (int i = 0; i < 5; i++) {
    cin >> t;
    sum += max(40, t);
  }
  cout << sum / 5 << "\n";
}

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 ()
{
	int a[4],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<iostream>
using namespace std;

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

C++: #include<stdio.h>

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

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int s=0;
  for(int i=0,a;i<5;i++){
    cin>>a;
    s+=max(40LL,a);
  }
  cout<<s/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 ()
{
	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<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>

using namespace std;

int main ()
{
	int a[i],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;
}