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>

using namespace std;

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

int main() {
	int s[5];
	REP(i,5) {
		cin >> s[i];
		if (s[i] < 40) s[i] = 40;
	}

	int total = 0;
	REP(i,5) total += s[i];

	cout << total / 5 << endl;

	return 0;
}

C++: #include<iostream>

using namespace std;

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

  return 0;
}

C++: #include <iostream>
#include <vector>

using namespace std;

int main(){
    vector<int> n(5);
    for(int i = 0; i < 5; i++){
        cin >> n[i];
    }
    int total = 0;
    for(int i = 0; i < 5; i++){
        if(n[i] < 40){
            total += 40; //40点以下は一律40点としてカウント
        }
        else{
            total += n[i];
        }
    }
    cout << total / 5 << endl;
}

C++: //
//  main.cpp

#include <iostream>
using namespace std;


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

C++: #include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;


int main(){

	int sum = 0,tmp;

	for(int i = 0; i < 5; i++){
		scanf("%d",&tmp);

		if(tmp >= 40)sum += tmp;
		else sum += 40;
	}

	printf("%d\n",sum/5);

    return 0;
}

C++: #include<iostream>
#include<algorithm>

using namespace std;

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

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

int main(){
	int a[5];
	
	for(int i = 0; i < 5; i++){
		scanf("%d", &a[i]);
		if(a[i] < 40) a[i] = 40;
	}
	
	printf("%d\n", (a[0] + a[1] + a[2] + a[3] + a[4]) / 5);
	
	return 0;
}

C++: #include<stdio.h>

int average(int a[])
{
  int i,sum=0;
  for(i=0;i<5;i++){
    if(a[i]<40){
      a[i]=40;
    }
    sum=sum+a[i];
  }
  return(sum/5);
}

int main(void)
{
  int a[5];
  int s;
  int i;
  for(i=0;i<5;i++){
    scanf("%d",&a[i]);
  }

  s=average(a);
  printf("%d\n",s);
  return(0);
}

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

C++: // AOJ 0592
#include <iostream>
#include <cmath>

using namespace std;

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

	return 0;
}

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

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

int main()
{
  int a[5], i, p = 0;
  
  REP(i, 5){
    cin >> a[i];
    if (a[i] < 40) a[i] = 40;
    p += a[i];
  }
  cout << p / 5 << endl;
}

C++: #include <iostream>
#include <cstdlib>

using namespace std;
const static int N = 5;
const static int BOTTOM = 40;

int main() {
  int sum = 0;
  for( int i = 0; i < N; i++ ) {
    int score;
    cin >> score;
    sum += max( BOTTOM, score );
  }
  cout << sum / N << endl;

  return EXIT_SUCCESS;
}

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 <iostream>
#include <cstdio>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

//v.erase(unique(v.begin(),v.end()),v.end());


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

C++: #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "functional"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-8;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;

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

	vector<int>v(5);
	for (auto &i : v) {
		cin >> i;
		i = max(i, 40);
	}
	cout << accumulate(v.begin(), v.end(), 0) / 5 << endl;
	return 0;
}

C++: // Name        : isitarightriangle.cpp

#include <iostream>
using namespace std;

int main() {
	int tensu[5], tasu = 0;

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

	cout << tasu / 5 << endl;

}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>

using namespace std;

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

C++: #include <stdio.h>

#define N 5
#define MINIMUM_SCORE 40

int main(void) {
  int sum = 0;
  int a = 0;

  for (int i = 0; i < N; i++) {
    scanf("%d", &a);

    if (a < MINIMUM_SCORE) {
      a = MINIMUM_SCORE;
    }

    sum += a;
  }

  int average = sum / N;
  printf("%d\n", average);

  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 <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 += max(40,t);
  }
  ret /= 5;

  cout << ret << endl;
  return 0;
}

C++: /*#include<iostream>
using namespace std;
int main() {
int a, sum = 0;
for (int i = 0; i < 4; i++) {
cin >> a;
sum += a;
}
cout << sum / 60 << endl << sum % 60 << endl;
}*/
/*#include<iostream>
using namespace std;
int main() {
int min1 = 2000, min2 = 2000, a;
for (int i = 0; i < 3; i++) {
cin >> a;
if (min1 > a)min1 = a;
}
for (int i = 0; i < 2; i++) {
cin >> a;
if (min2 > a)min2 = a;
}
cout << min1 + min2-50 << endl;
}*/
/*#include<iostream>
using namespace std;
int main() {
int a[5], b[2] = {1}, sum = 0;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
while (a[1] > a[3]*b[0]) {
b[0]++;
//cout << "bakatoy" << endl;
}
while (a[2] > a[4]*b[1]) {
b[1]++;
//cout << "bakatoy" << endl;
}
if (b[0] > b[1]) {
cout << a[0]-b[0] << endl;
}
else {
cout << a[0]-b[1] << endl;
}
}*/
#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;
	}
	cout << sum / 5 << endl;
}