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 <iostream>

void solve() {
    int sum = 0;
    for (int i = 0; i < 5; ++i) {
        int x;
        std::cin >> x;
        sum += std::max(x, 40);
    }
    std::cout << sum / 5 << std::endl;
}

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

    solve();

    return 0;
}

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

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

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

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

C++: #include <cstdio>

#define N	5

int main()
{
	int sum = 0;
	for (int i = 0; i < N; i++)
	{
		int pts;

		::scanf("%i", &pts);

		sum += (pts < 40 ? 40 : pts);
	}

	::printf("%i\n", sum / N);
}

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

C++: #include <iostream>

using namespace std;

int main(void){

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

  return 0;
}

C++: #include <cstdio>

using namespace std;

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

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

int main() {
    int scores[5]; for (int i=0; i<5; i++) cin >> scores[i];

    int sum = 0;
    for (int i=0; i<5; i++) {
        if (scores[i] >= 40) sum += scores[i];
        else sum += 40;
    }

    cout << sum / 5 << endl;
}

C++: #include  <iostream>

using namespace std;

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

C++: // 2014/01/28 Tazoe

#include <iostream>
using namespace std;

int main()
{
	int sum = 0;

	for(int i=0; i<5; i++){
		int s;
		cin >> s;

		if(s>=40){
			sum += s;
		}
		else{
			sum += 40;
		}
	}

	cout << sum/5 << endl;

	return 0;
}

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

C++: #include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<algorithm>
using namespace std;
vector<int> Dist,Clouds;
int dx[8]={1,1,1,0,0,-1,-1,-1},dy[8]={-1,0,1,-1,1,-1,0,1};

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

C++: // 平均点

#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    int point;
    int sum = 0;

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

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

int main() {
  int T, J, S, Y, H;
  cin >> T >> J >> S >> y >> H;

  if(T<40){
  T = 40;
  }
  if(J<40){
  J = 40;
  }
  if(S<40){
  S = 40;
  }
  if(Y<40){
  Y = 40;
  }
  if(H<40){
  H = 40;
  }

 cout << (I + J + S + Y + H)/5 << endl;

return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	int d[5]={},ans=0;
	rep(i,0,5){
		cin>>d[i];
		if(d[i]<40) d[i]=40;
		ans+=d[i];
	}
	o(ans/5);
}

C++: #include<iostream>
using namespace std;
int main(){
    int sum=0;
    for(int i=0;i<5;i++){
        int a;
        cin>>a;
        sum+=a;
    }
    cout<<sum/5<<endl;
    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",ans);
	
	return 0;
	
}

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

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

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

int main(int argc, char const* argv[])
{
  int i, input;
  vector<int> scores;

  for (i = 0; i < 5; i++) {
    cin >> input;
    if (input < 40) { input = 40; }
    scores.push_back(input);
  }

  cout << accumulate(scores.begin(), scores.end(), 0) / 5 << endl;

  return 0;
}

C++: #include <stdio.h>
int main () {
	int data[5],i,ave;
	int sum = 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 = sum + data[i];
	}
	ave = sum / 5;
	printf("%d\n",ave);
}

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

#include <iostream>
using namespace std;
int A,B,C,D,E;
int main() {
	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;

	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cctype>
#include<complex>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<functional>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>
#include<numeric>
#define INF 1e+8
#define EPS 1e-8
#define PB push_back
#define fi first
#define se second
#define rep(i,j) for(int  i = 0; i < (j); i++)
#define reps(i,j,k) for(int i = j; i < k; i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
int main(){
    int sum = 0;
    rep(i,5){
        int tmp;
        scanf("%d",&tmp);
        sum += (tmp > 40) ? tmp : 40;
    }
    printf("%d\n",sum/5);
    return 0;
}

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

C++: #include <iostream>

using namespace std;
int main(){
	int value = 0;
	int score;
	for(int i=0; i < 5; i++){
		cin >> score;
		if(score < 40) value += 40;
		else value += score;
	}
	cout << value/5 << endl;
}

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

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

int main(int argc, char *argv[]){
  int ave = 0;
  int n;
  for (int i = 0; i < 5; i++) {
    cin >> n;
    if(n < 40)n = 40;
    ave += n;
  }
  std::cout << ave / 5 << std::endl;
  return 0;
}