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 <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

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

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back
#define sz size()

const double EPS = 1e-10;
const int INF = 100000000;

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

    
    return 0;
}

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



using namespace std;


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

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>
using namespace std;

int main() {
	int s = 0;
	for (int i = 0; i < 5; i++) {
		int a;
		cin >> a;
		s += (a < 40) ? 40 : a;
	}
	cout << s / 5 << endl;
	return 0;
}

C++: #include <iostream> //以下のコードは、とても無駄が多いです。
using namespace std;

int main(){

int tokuten;
int goukei;
goukei = 0;
int i;

for ( i =0 ; i <5 ; i = i+1 ){
	cin>>tokuten;
		if(tokuten<40){ tokuten =40; }
		goukei = goukei + tokuten;
}

cout <<goukei / 5 <<endl ;

return 0;
}

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

int main() {
  int t, sum = 0;
  for (int i = 0; i < 5; i++) {
    cin >> t;
    sum += max(40, t);
  }
  cout << sum / 5 << "\n";
}

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

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

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

C++: #include<stdio.h>

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

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int s=0;
  for(int i=0,a;i<5;i++){
    cin>>a;
    s+=max(40LL,a);
  }
  cout<<s/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 ()
{
	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<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 <iostream>

using namespace std;

int main ()
{
	int a[i],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 <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    vi v(5,0);
    rep(i,5){cin>>v[i]; v[i]<40 ? v[i]=40:v[i]=v[i];}
    rep(i,5)if(i)v[i]+=v[i-1];
    //cout<<v[4]<<endl;
    cout<<v[4]/5<<endl;
}

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

using namespace std;

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

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

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<cstdlib>
using namespace std;

int main() {
  int a;
  double ans = 0;
  for(int i = 0; i < 5; i++) {
    cin >> a;
    ans += a < 40 ? 40 : a;
  }
  cout << ans / 5 << endl;
}

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

int main(){

  int a[4], i, m=0;

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

  cout << m/5 << endl;

  return 0;

}

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

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a[5],b;
    for(int i=0;i<5;i++){
        cin >> b;
        if(b<40){a[i]=40;}
        else a[i]=b;
    }
    int ans=0;
    for(int i=0;i<5;i++){
        ans+=a[i];
    }
    cout << ans/5 << endl;


    return 0;
}

C++: #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=sum+a;
	}
	cout << sum/5 << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
//#define int long long
using namespace std;

int score[5];

signed main()
{
	rep(i,5) cin >> score[i];
	rep(i,5) if (score[i] < 40) score[i] = 40;
	int sum = 0;
	rep(i,5) sum += score[i];
	cout << sum / 5 << endl;
}

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

int main(){
    int ans = 0;

    for(int i = 0 ; i < 5 ; ++i){
        int n;
        cin >> n;
        ans += max(n, 40);
    }

    ans /= 5;

    cout << ans << endl;

    return 0;
}

C++: #include<iostream>
#include <stdio.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;}