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(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>

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

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

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

int main(){
  int a;
  int b=0;
  for(int i; i<5; i++){
    cin>>a;
    a=a/5;
      if(a<8){
	a=8;
	}
    b=b+a;
    
      }
  cout<<b<<endl;
}

C++: n,k=5;main(m){for(;k--;n+=m<40?40:m)scanf("%d",&m);k=!printf("%d\n",n/5);}

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

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

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

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

	printf("%d\n", ans/5);
	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;
return 0;
}

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

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

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

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

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;

	// your code goes here
	return 0;
}

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

int main(){
	int ave=0;
	for(int i=0;i<5;i++){
		int a;
		scanf("%d",&a);
		ave+=max(40,a);
	}
	printf("%d\n",ave/5);
}

C++: #include<stdio.h>

int average(int a[])
{
int i,sum=0;
for(i=0;i<5;i++){
if(a[i]<40){
a[i]=40;
}
sum=sum+a[i];
}
return(sum/5);
}

int main(void)
{
int a[5];
int s;
int i;
for(i=0;i<5;i++){
scanf("5d",&a[i]);
}
s=average(a);
printf("%d\n",s);
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(d<40) d=40;
    if (b<40) b=40;      if(e<40) e=40;
    if (c<40) c=40;
    cout << (a+b+c+d+e)/5 <<endl;
}

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

int main(){
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	
	cout<<(a+b+c+d+e)/5<<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;
	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(void){
    int s=0;
    int i;
    for(i=0;i<5;i++){
        int a;
        cin>>a;
        if(a<40)    s=s+40;
        else    s=s+a;
    }
    cout<<s/5;
    cout<<endl;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
#include<stdio.h>
#include <cstdint>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;


int a[5];

int main(){

	rep(i, 5) {
		cin >> a[i];
		if (a[i] < 40)a[i] = 40;
	}

	cout << (a[0] + a[1] + a[2] + a[3] + a[4]) / 5 << endl;

	return 0;
}

C++: #define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
using namespace std;
int main(){
	
	int a,s=0;
	
	for(int i=0;i<5;i++){
		cin>>a;
		if(a<40)
			a=40;
		s+=a;
	}
			
	cout<<s/5<<endl;

}

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;
		sum += a;
	}
	cout << sum / 5 << endl;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <utility>

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 << (int)(sum / 5) << endl;
}

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

C++: #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <sstream>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
#include <stack>
#include <list>
using namespace std;
#define INF 100000000
typedef long long int lli;
typedef pair<int,int> P;

int main(){
	int ans=0;
	for(int i=0; i<5; ++i){
		int tmp;
		cin >> tmp;
		if(tmp<40) tmp=40;
		ans+=tmp;
	}
	cout << ans/5 << "\n";
	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 ()
{
	int a[4],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;
}