Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)
	sum := 0
	for i := 0; i < 5; i++ {
		score := nextInt()
		if score < 40 {
			sum += 40
		} else {
			sum += score
		}
	}
	// fmt.Println(sum)
	fmt.Println(sum / 5)
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s; }


int a[5];

int main() {
    while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]) {
        int res = 0;
        for (int i = 0; i < 5; ++i) {
            if (a[i] < 40) a[i] = 40;
            res += a[i];
        }
        cout << res/5 << endl;
    }
    return 0;
}

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

using namespace std;

int main() {
    int sum = 0;
    for (int i = 0; i < 5; ++i) {
        int s;
        cin >> s;
        if (s < 40) s = 40;
        sum += s;
    }
    cout << sum / 5 << '\n';
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <map>
#include <vector>

using namespace std;

int main() {
int a=0;
for(int i=0;i<5;i++){
int n;
if(n<40) n=40;
a=a+n;

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

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	int a, b=0;
	REP(i, 5) {
		in >> a;
		b += a;
	}

	
	out << b/5 << endl;
	return 0;

}

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

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

C++: #include <iostream>
using namespace std;
 
int main() {
  int n=0,sum=0,x;
  while(cin >> x) {
    if(x<=40) x=40;
    sum+=x;
    n++;
  }
  cout << sum/n << 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;
	cin>>num1>>num2>>num3>>num4>>num5;
	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(){
	
	int a, b, c, d, e;
	cin >> a >>b >>c >>d >>e;
	int gokei = 0;
	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;
	}
	int answer = a+b +c +d + e;
	cout << answer << endl;

}

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

using namespace std;

int main() {
	
	int grade[5];

	while (cin >> grade[0]) {

		cin >> grade[1] >> grade[2] >> grade[3] >> grade[4];
		int sum = 0;

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

			if (grade[i] < 40)
				grade[i] = 40;

			sum += grade[i];

		}
		
		cout << sum / 5 << "\n";

	}

	return 0;

}

C++: #include<stdio.h>

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

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

int main() {
    int sum = 0;

    for (int i=0; i<5; i++) {
        int score;
        scanf("%d", &score);
        if (score < 40) score = 40;
        sum += score;
    }

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

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 (void)
{
	int a[5],con;

	for (int i = 0; i < 5; i++)
	{
		cin >> a;
		if (a < 40)
		{
			a = 0;
			a = 40;
		}
		con += a;
	}

	cout << con / 5 << endl;
}

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

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
  int data;
  int sum = 0;
  for(int i = 0; i < 5; i++) {
    cin >> data;
    if(data < 40)data = 40;
    sum += data;
  }
  cout << data / 5 << endl;
  return 0;
}

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;
return 0;
}

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

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

C++: #include<bits/stdc++.h>
int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}printf("%d\n",s/5);}

C++: #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define enld '\n'
#define rep(i,n) for(int i=0; i<(n); i++)
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast")
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[6] = {1, 0, -1, 0,1,1};
const int dy[6] = {0, 1, 0, -1,1,-1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
// ---------------------------------------------------------------------------

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int sum = 0;
    for(int i=0; i<5; i++){
        int a;
        cin >> a;
        sum += max(a,40);
    }
    cout << sum/5 <<enld;
    return 0;
}