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

	// your code goes here
	return 0;
}

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

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

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("5d",&a[i]);
}
s=average(a);
printf("%d\n",s);
return(0);
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b,c,d,e;
    cin >>a>>b>>c>>d>>e;
    
    if (a<40) a=40;      if(d<40) d=40;
    if (b<40) b=40;      if(e<40) e=40;
    if (c<40) c=40;
    cout << (a+b+c+d+e)/5 <<endl;
}

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

int main(){
  int a[5];
  int b=0;
  for(int i; i<5; i++){
    cin>>a[i];
    a[i]=a[i]/5;
      if(a[i]<8){
	a[i]=8;
	}
    b=b+a[i];
    
      }
  cout<<b<<endl;
}

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

int main(){
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	
	cout<<(a+b+c+d+e)/5<<endl;
	return 0;
	}

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

int main()
{
	//
	int num1=0,num2=0,num3=0,num4=0,num5=0,num6=0;
	if(num1<40){
		num1=40;
	}
	if(num2<40){
		num2=40;
	}
	if(num3<40){
		num3=40;
	}
	if(num4<40){
		num4=40;
	}
	if(num5<40){
		num5=40;
	}
	num6=(num1+num2+num3+num4+num5)/5;
	cout<<num6;
	cout<<"\n";
	return 0;
}

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
#include<stdio.h>
#include <cstdint>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;


int a[5];

int main(){

	rep(i, 5) {
		cin >> a[i];
		if (a[i] < 40)a[i] = 40;
	}

	cout << (a[0] + a[1] + a[2] + a[3] + a[4]) / 5 << endl;

	return 0;
}

C++: #define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
using namespace std;
int main(){
	
	int a,s=0;
	
	for(int i=0;i<5;i++){
		cin>>a;
		if(a<40)
			a=40;
		s+=a;
	}
			
	cout<<s/5<<endl;

}

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;
		sum += a;
	}
	cout << sum / 5 << endl;
}

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

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 << (int)(sum / 5) << endl;
}

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>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <sstream>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
#include <stack>
#include <list>
using namespace std;
#define INF 100000000
typedef long long int lli;
typedef pair<int,int> P;

int main(){
	int ans=0;
	for(int i=0; i<5; ++i){
		int tmp;
		cin >> tmp;
		if(tmp<40) tmp=40;
		ans+=tmp;
	}
	cout << ans/5 << "\n";
	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[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 <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;
}