Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sum := 0.0
	for i := 0; i < 5; i++ {
		sc.Scan()
		s, _ := strconv.Atoi(sc.Text())
		sum += math.Max(float64(s), float64(40))
	}
	fmt.Println(int(sum / 5))

}

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

C++: //14-1 ?????????
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
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;
    int ans =(a+b+c+d+e)/5;
    cout << ans << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main ()
{
	int a[3000],con;

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

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

C++: #include <iostream>

using namespace std;

int main(){

	int test;
	int sum = 0;

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

	cout << sum / 5 << endl;

	return 0;
}

C++: //============================================================================
// Name        : svdzva.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),n.end()
#define PI acos(-1)
using namespace std;
int main(){
  int sum=0;
  int tmp;
  rep(i,5){
    cin>>tmp;
    if(tmp>=40)sum+=tmp;
    else sum+=40;
  }
  cout<<sum/5<<endl;


}

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

C++: 
#include<stdio.h>

int main (void){

    int point = 0;
    int total = 0;
    int avel = 0;

    int i;

    for(i=0;i<5;i++){
        scanf("%d",&point);
        if(point < 40){
            total += 40;
        }else{
            total += point;
        }
    }
    avel = total / 5;

    printf("%d\n",avel);

    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>

using namespace std;

#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(a,x,b) ((a)<=(x)&&(x)<=(b))
#define ALL(v) (v).begin(), (v).end()
#define LENGTHOF(x) (sizeof(x) / sizeof(*(x)))
#define AFILL(a, b) fill((int*)a, (int*)(a + LENGTHOF(a)), b)
#define SQ(x) ((x)*(x))
#define Mod(x, mod) (((x)+(mod)%(mod))
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define INF 1 << 30
#define EPS 1e-10
#define MOD 1000000007

typedef pair<int, int> pi;
typedef pair<int, pi> pii;
typedef vector<int> vi;
typedef queue<int> qi;
typedef long long ll;

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

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,n;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	scanf("%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;
	}
	n=(a+b+c+d+e)/5;
	printf("%d\n",n);
	
	return 0;
}

C++: #include <stdio.h>
int main(void){
	
	int a,b,c,d,e,ans;
	
	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;
	}
	ans = a + b + c + d + e;
	
	ans = ans / 5;
	
	printf("%d\n",ans);
	
	return 0;
	
}