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<stdio.h>
int main(){
	int x[5],i,a=0;
	scanf("%d",&x[0]);
	scanf("%d",&x[1]);
	scanf("%d",&x[2]);
	scanf("%d",&x[3]);
	scanf("%d",&x[4]);
	for(i=0;i<5;i++){
		if(x[i]<40)
		x[i]=40;
		a+=x[i];
	}
	printf("%d\n",a/5);
return 0;
}

C++: #include <stdio.h>

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

C++: #include<iostream>

using namespace std;

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

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

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

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

C++: #include<iosteam>
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++: public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int[] score = new int [5];
		int i, sum = 0;
		for(i = 0; i < 5; i++){
			score[i] = sc.nextInt();
			if(score[i] < 40){
				score[i] = 40;
			}
		}
		//System.out.printf("%d\n", score[0]);
		for(int k = 0; k < 5; k++){
			sum = sum + score[k];
		}
		System.out.printf("%d\n", sum / 5);
	}

}

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

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

C++: #include <iostream>

using namespace std;

int main(void){

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

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(ll i=(n)-1;i>=0;i--)
#define range(i,a,n) for(ll i=(a);i<(n);i++)
#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (1000000007ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI (3.1415926535897932384)

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};
template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S sum(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}

template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>void tf(bool b,S t,T f){if(b)puta(t);else puta(f);}
void YN(bool b){tf(b,"YES","NO");}
void Yn(bool b){tf(b,"Yes","No");}
void yn(bool b){tf(b,"yes","no");}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1;for(auto s:t){os<<(a?"":" ")<<s;a=0;}return os;}
template<class S>auto&operator>>(istream&is,vector<S>&t){for(S&a:t)cin>>a;return is;}

/*他のライブラリを入れる場所*/


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	vl a(5);
	rep(i,5){cin>>a[i];chmax(a[i],40ll);}
	puta(sum(a)/5);
	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;
for(int i=0;i<5;i++){
cin>>a;
sum+=a;
}
cout<<sum/5<<endl;
}

C++: //============================================================================
// Name        : 練習.cpp
// Author      : 
// 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;

	return 0;
}

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

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

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

C++: #include <iostream>
#include <math.h>
using namespace std;
int main(){
    int a[5];
    double sum=0;
    for(int i=0;i<5;i++){
        cin>>a[i];
        if(a[i]<40)a[i]=40;
        sum+=a[i];
    }
    cout<<sum/5.0<<endl;
}

C++: #include<iostream>
using namespace std;
int main(){
  int t[5],sum;
  sum=0;
  for(int i=0;i<5;i++){
    cin>>t[i];
    if(t[i]>=40){
      sum+=t[i];
    }else{
      sum+=40;
    }

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

C++: #include <bits/stdc++.h>
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;
   return 0;
}

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

int main() {
	int sum=0;
	// your code goes here
	for(int i=0;i<5;i++){
		int r;
		cin >> r;
		sum+=max(r,40);
	}
	cout << sum/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\n", ave);
	
	return 0;
}