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 sum = 0, x;
	while (cin >> x) sum += x;
	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]=40;
    sum+=a[i];
  }

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

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

using namespace std;

int main() {
int a=0;
for(int i=0;i<5;i++){
int n;
cin>>n;
if(n<40) {
n=40;
}

a=a+n;

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;

#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
#define range(i,a,n) for(int i=(a);i<(n);i++)

#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (1000000007ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI 3.1415926535897932384

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};

template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S acm(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}

ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}
template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1; for(auto s:t){os<<(a?"":" ")<<s;a=0;} return os;}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int ans=0,in;
	rep(i,5)cin>>in,ans+=max(in,40);
	cout<<ans/5<<endl;
}

C++: #include <iostream>
using namespace std;
int main(){

int a,b,c,d,e,f;

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)/5;

cout <<f<<endl;



return 0;
}

C++: #include<bits/stdc++.h>
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 << sum/5 << endl;

 return 0;
}

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

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

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

int main() {
	int sum = 0;
	rep(i, 5) {
		int score;
		cin >> score;
		sum += (score < 40 ? 40 : score);
	}

	cout << sum / 5 << endl;

	return EXIT_SUCCESS;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define POF pop_front
#define POB pop_back
#define MA make_pair
#define ll long long
#define VE vector<int>
#define VP vector<pair<int,int> >
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
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 <stdio.h>
int main(){
	int i,score[5],sum,ave;
	for(i = 0;i < 5;i++){
		scanf("%d",&score[i]);
		if(score[i] < 40){
			sum += 40;
		}else{
		sum += score[i];
		}
	}
	ave = sum / 5;
	printf("%d\n",ave);
	return 0;
}

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 <bits/stdc++.h>
using namespace std;

#define llong long long
#define inf 999999999
#define mp make_pair
#define pb push_back
#define fn fill_n
typedef pair<int, int> P;
typedef pair<P, int> PP;
typedef pair<PP, int> PPP;
typedef struct data{
	int now;
	int cost;
}data;
int nh[4] = {1, 0, -1, 0};
int nw[4] = {0, 1, 0, -1};





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

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

int main(){
  int a[5];
  double ave = 0.0;

  for(int i = 0 ; i < 5 ; i++){
    cin >> a[i];
    ave += (a[i] >= 40 ?  a[i] : 40);
  }
  cout << ave / 5 << endl;

  return 0;
}

C++: //Average Score
#include <iostream>

using namespace std;

int main() {
    int total_score = 0, score;
    for(int i = 0; i < 5; i++) {
        cin >> score;
        total_score += max(40, score);
    }

    cout << total_score / 5 << endl;
}

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

int main(int argc, char const *argv[]) {
	int tensu[5], ave = 0;

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

	ave /= 5;

	cout << ave << endl;

	return 0;
}

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

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

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

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

using namespace std;

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

C++: #include<iostream>

using namespace std;

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

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 <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int a[5],s=0;
r(i,5)cin>>a[i];
r(i,5){
if(a[i]<40)s+=40;
else s+=a[i];
}
cout<<s/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 ;
}