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 <stdio.h>
#include <iostream>
using namespace std;

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

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

int main()
{
int a,sum=0;
int i;

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

}

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

int main(){
  int a[5],sum=0;

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

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

C++: #include<iostream>

using namespace std;

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

    return 0;
}

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

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

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

C++: #include<stdio.h>
#include<math.h>
#include<algorithm>
#include<cctype>
#include<string.h>
#include <stdlib.h>

#define PI 3.1415926
void swap(int* x, int* y) {
	int a = *x;
	int b = *y;
	*x = b;
	*y = a;
}
int factorial(int n);
int sum(int n, int*);
int ave(int n, int*);
int min(int n, int*), min(int n, int m);
int max(int n, int*), max(int n, int m);

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

int factorial(int n) {
	if (n > 0) {
		return n * factorial(n - 1);
	}
	else {
		return 1;
	}
}
int sum(int n, int *all) {
	int total = 0;
	for (int i = 0; i < n; ++i) {
		total += all[i];
	}
	return total;
}
int ave(int n, int *all) {
	int total = 0;
	for (int i = 0; i<n; ++i) {
		if (all[i] < 40)all[i] = 40;
		total += all[i];
	}
	return total / n;
}
int min(int n, int *all) {

	int min = all[0];
	for (int i = 1; i < n; ++i) {
		if (all[0] > all[i]) {
			min = all[i];
		}
	}
	return min;
}
int max(int n, int *all) {
	int max = all[0];
	for (int i = 1; i<n; ++i) {
		if (all[0]<all[i]) {
			max = all[i];
		}
	}
	return max;
}
int max(int n, int m) {
	if (n >= m) {
		return n;
	}
	else {
		return m;
	}
}
int min(int n, int m) {
	if (n >= m) {
		return m;
	}
	else {
		return n;
	}
}

C++: #include<iostream>
using namespace std;
int main(void)
{
    int n,A=0;
    for(int i=0;i<5;i++){
        cin>>n;
        if(n<40)n=40;
        A+=n;
    }
    cout<<A/5<<"\n";
}

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

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

using namespace std;

int main ()
{
	int a,b,c,d,e,ss;
	
	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;
	ss=(a+b+c+d+e)/5;
	
	cout<<ss<<endl;
	
	
	
return 0;	
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define first F
#define second S

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int n;
  int sum=0;
  rep(i,5){
    cin>>n;
    sum+=max(n,40);
  }
  cout<<sum/5<<endl;
}

C++: #include<bits/stdc++.h>

#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

int main(){
  double temp,sum=0;

  rep(i,5) { cin >> temp; if( int(temp) < 40 ) temp = 40; sum += temp; }
  printf("%.0f\n",sum/5);
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

  int total = 0, ten;
  for(int i = 0 ; i < 5 ; i++){
    cin >> ten;
    total += ten >= 40 ? ten : 40;
  }
  cout << total / 5 << endl;

  return 0;
}

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

int main()
{
    int a; int b; int c; int d; int 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;
}

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

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

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

C++: #include<bits/stdc++.h>

using namespace std;

main(){
	int a,b,c,d,e,f=0;
	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;}
	f=(a+b+c+d+e);
	f=f/5;
	printf("%d\n",f);
}

C++: #include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define REP3(i, m, n) for(int i = m, i##_len=(n);i < i##_len;i++)
#define FORVEC(i, v) for(int i = 0;i < v.size();i++)

#define INF 1000000000
#define pb(a) push_back(a)
#define llong long long
#define vi vector<int>
#define P pair<int,int>
#define all(vec) (vec.begin()),(vec.end())

int main(){
	int a=0,buf;
	REP(i,5){
		cin>>buf;
		if(buf<40)buf=40;
		a+=buf;
	}
	cout<<a/5<<"\n";
	
	return 0;
}