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>
using namespace std;

int main()
{
	int ta,ji,sa,si,ha,total=0;
	cin >> ta >> ji >> sa >> si >> ha;

	if(ta>=40){
		total += ta;
	}else{
		total += 40;
	}
	if(ji>=40){
		total += ji;
	}else{
		total += 40;
	}
	if(sa>=40){
		total += sa;
	}else{
		total += 40;
	}
	if(si>=40){
		total += si;
	}else{
		total += 40;
	}
	if(ha>=40){
		total += ha;
	}else{
		total += 40;
	}
	cout << total/5 << "\n";
	return 0;
}

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

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

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  vi v(5);
  rep(i, 5) {
    cin >> v[i];
    v[i] = max(40LL, v[i]);
  }
  cout << accumulate(all(v), 0) / 5 << endl;
}

C++: #include <iostream>

using namespace std;

int main(){
	int stu[5];
	int ave = 0;

	for (int i = 0; i < 5; i++){
		cin >> stu[i];
		if (stu[i] < 40){
			stu[i] = 40;
		}
		ave += stu[i];
		if (i == 4){
			cout << ave / 5 << endl;
		}
	}

	return 0;
}

C++: #include <stdio.h>

int main(){
	int A,B,C,D,E,sum,average = 0;
	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;
	}
	sum = A+B+C+D+E;
	average = sum/5;
	printf("%d\n",average);
	return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std ;
int main()
{
    int score = 0 ;
    int total = 0 ;
    for ( int i = 0 ; i < 5 ; i++ )
    {
        cin >> score ;
        if (score < 40) score = 40 ;
        total += score ;
    }
    cout << total / 5 << 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;
cin>>n;
if(n<40) {
n=40;
}

a=a+n;

}
cout<<a/5;
	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(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 <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10
#define MAX_N 20000
#define MAX_M 16

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

int a;

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

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

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

C++: #include<iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <cmath>
#include <set>
#include <string.h>
#include <functional>

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 a[5];
  int b;
  for(int i; i<5; i++){
    cin>>a[i];
    b=b+a[i];
      }
  cout<<b/5<<endl;
}

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<stdio.h>
int main(){
	int data[5]={0};
	int i,ave=0;
	for(i=0;i<5;i++){
		scanf("%d",&data[i]);
		if(data[i]<40){
			data[i]=40;
		}
		//printf("data[%d]=%d\n",i,data[i]);
		ave += data[i];
	}
	//printf("sum=%d\n",ave);
	ave = ave/5;
	printf("%d\n",ave);

	return 0;
}

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

int main(){
int a=0;
int b;
for(int c=0;c<5;c++){
	scanf("%d",&b);
	if(b<40)b=40;
	a+=b;
}
printf("%d\n",a);
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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 ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}
bool is_prime(ll n) {
  for (ll i = 2; i*i <= n; i++) {
    if (n%i == 0) return false;
  }
  return n != 1;
}
ll mod_pow(ll x, ll n, ll mod) {
  if (n == 0) return 1;
  ll res = mod_pow(x*x%mod, n/2, mod);
  if (n & 1) res = res * x % mod;
  return res;
}

int main() {
    ll res = 0;
    rep(i, 5) {
        ll a;
        cin >> a;
        if (a > 40) {
            res += a;
        } else {
            res += 40;
        }
    }
    cout << res/5 << endl;
}

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

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