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>
#include <algorithm>
#include <array>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>

#define INF 1000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(int i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)
#define vint vector<int>
#define vvint vector<vector<int>>
#define vsort(x) sort(x.begin(),x.end())

using int64 = uint64_t;

using namespace std;

int main() {
	int x;
	int sum = 0;
	rep(i, 0, 5) {
		cin >> x;
		sum += max(40, x);
	}
	cout << sum/5 << endl;
	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 <stdio.h>

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

C++: #include <iostream>

using namespace std;

int main() {
    int sum = 0, v;
    for (int i = 0; i < 5; i++) {
        cin >> v;
        sum += v < 40 ? 40 : v;
    }
    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 n=0,sum=0,x;
  while(cin >> x) {
    if(x<=40) x=40;
    sum+=x;
    n++;
  }
  cout << sum/n << endl;
  return 0;
}

C++: #include<cstdio>
#include<iostream>
int main(){
    int x[5],sum=0;
    for(int i=0;i<5;i++){
        scanf("%d",&x[i]);
        if(x[i]<40)
            x[i]=40;
        sum+=x[i];
    }
    printf("%d\n",sum/5);
    return 0;
}

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
    int a[6],all=0;
    for(int i=0;i<5;i++){
        cin>>a[i];
        if(a[i]<40)a[i]=40;
        all+=a[i];
    }
    cout<<all/5<<endl;
}

C++: #include <cstdio>

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

C++: i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);}

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

#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;
	}
	int answer = (a+b +c +d + e)/ 5;
	cout << answer << endl;

	return 0;

}

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

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

int main()
{
  int x, sum;

  sum = 0;

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

  cout << sum / 5 << endl;

  return 0;
}

C++: #include <stdio.h>
#include <cctype>
#include <limits.h>
#include <math.h>
#include <complex>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) static_cast<bitset<16> >(x);
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 1000000000;
const double EPS = 1e-8;
const double PI = 3.14159;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0592 : Average Score **/
int main()
{
	int N=0;
	rep(i, 5) {
		int a; cin>>a;
		N += max(40, a);
	}
	cout << N/5 << endl;
}

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[i];
		if (a[i] < 40)
		{
			a[i] = 0;
			a[i] = 40;
		}
		else
		{
		}
		con += a[i];
	}

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

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

C++: #include "iostream"
#include "math.h"
#include "algorithm"
#include "string"
#include "vector"
#include "cmath"
using namespace std;

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

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int a[5];
	int h=0;
	for(int i=0;i<5;i++){
		cin>>a[i];
		if(a[i]<40)
			a[i]=40;
		h+=a[i];
	}
	cout<<h/5<<endl;
	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 (void)
{
	int a,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 <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;

int main() {
	vector<int> a(5);
	for (int& i : a) {
		cin >> i;
		i = max(40, i);
	}
	cout << accumulate(a.begin(), a.end(), 0) / 5 << endl;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

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