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

C++: #include <iostream>
#include <string>
#include <stdio.h>
#include <numeric>
#include <algorithm>
#include <math.h>
using namespace std;
int main(){
    int sum=0;
    for(int i=0;i<5;++i){
        int n;
        cin>>n;
        if(n>=40){
            sum+=n;
        }
        else{
            sum+=40;
        }
    }
    cout<<sum/5<<endl;
    return 0;
}

C++: #include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
int main(){
	int d,sum=0;
	for(int i=0;i<5;i++){
		cin>>d;
		sum+=max(d,40);
	}
	cout<<sum/5<<endl;
}

C++: #include<stdio.h>

int main(){
 int data[10], i, sum = 0, ave;
 for(i = 1; i <= 5; i++){
  scanf("%d", &data[i]);
 if(data[i] < 40) data[i] = 40;
 sum += data[i];
 }
 ave = sum / 5;
 printf("%d\n", ave);
 return 0;
}

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

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

using namespace std;

int main(void){

  int ans=0,a;

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

  cout << ans/5 << endl;

  return 0;
}

C++: #include <iostream>
int main(){int a,b=0;for(int i=0;i<5;i++){std::cin>>a;b+=a>40?a:40;}std::cout<<b/5<<"\n";return 0;}

C++: #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int a[5],s=0;
r(i,5)cin>>a[i];
r(i,5){
if(a[i]<40)s+=40;
else s+=a[i]
}
cout<<s/5<<endl;
}

C++: #include<stdio.h>
int main(void)
{
    int i,a,b;
	b=0;
	for(i=0;i<5;i++){
	scanf("%d",&a);
	if(a>=40){
	b+=a;
	}
	else{
	b+=40;
	}
	}
	printf("%d\n",b/5);
	return 0;
	}

C++: #include<stdio.h>
int main(void)
{
	int a[6],i,c,n;
	c=0;
	n=0;
	for(i=1;i<=5;i++){
		scanf("%d",&a[i]);
		if(a[i]<40){
			a[i]=40;
			c=c+a[i];
		}
		else{
			c=c+a[i];
		}
	}
	n=c/5;
	printf("%d\n",n);
	return 0;
}

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

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>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n;i>=0;i--)
#define INF 100000005
#define MAX 1002
#define mp make_pair
#define pb push_back
#define fi first
#define se second
using namespace std;
//__gcd(a,b), __builtin_popcount(a);

int main(){
	int a[5], ans = 0;
	rep(i,5)scanf("%d", &a[i]);
	rep(i,5)ans += max(40, a[i]);
	printf("%d\n", ans/5);
	return 0;
}