Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)
	sum := 0
	for i := 0; i < 5; i++ {
		score := nextInt()
		if score < 40 {
			sum += 40
		} else {
			sum += score
		}
	}
	// fmt.Println(sum)
	fmt.Println(sum / 5)
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
  int data;
  int sum = 0;
  for(int i = 0; i < 5; i++) {
    cin >> data;
    if(data < 40)data = 40;
    sum += data;
  }
  cout << sum / 5 << endl;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <map>
#include <functional>
#include <cmath>
#include <cstdio>
using namespace std;

#define PI 4*atan(1);

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

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

int main() {
  int T, J, S, Y, H;
  cin >> T >> J >> S >> Y >> H;

  if(T<40){
  T = 40;
  }
  if(J<40){
  J = 40;
  }
  if(S<40){
  S = 40;
  }
  if(Y<40){
  Y = 40;
  }
  if(H<40){
  H = 40;
  }

 cout << (T + J + S + Y + H)/5 << endl;

return 0;
}

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

int main() {
	int t,z,s,y,h;
	cin>>t>>z>>s>>y>>h;
	if(t<40){
		t=40;
	}
	if(z<40){
			z=40;
		}
	if(s<40){
			s=40;
		}
	if(y<40){
			y=40;
		}
	if(h<40){
			h=40;
		}
	cout<<(t+z+s+y+h)/5<<endl;
	return 0;
}

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

using namespace std;

int main() {
	int score, total;

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

	return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,d,e,x,y;
	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;
	}
	x=a+b+c+d+e;
	y=x/5;
	cout << y << endl;
}

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

int main(){
	int a[5];
	for (int i = 0; i < 5; i++){
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < 5; i++){
		if (a[i] < 40){
			a[i] = 40;
		}
	}
	printf("%d\n", (a[0] + a[1] + a[2] + a[3] + a[4]) / 5);

	return 0;
}

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

int main() {
	int a, b, c, d, e; cin >> a >> b >> c >> d >> e;
	a = (a < 40 ? 40 : a);
	b = (b < 40 ? 40 : b);
	c = (c < 40 ? 40 : c);
	d = (d < 40 ? 40 : d);
	e = (e < 40 ? 40 : e);
	cout << (a + b + c + d + e) / 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[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>
#include <numeric>

#define N 5
#define min_score 40

using namespace std;

int main()
{
  int scores[N];

  for(int i = 0; i < N; i += 1){
    cin >> scores[i];
    scores[i] = max(scores[i], min_score);
  }

  cout << (accumulate(scores, scores+N, 0)/N) << endl;

  return 0;
}

C++: #include<stdio.h>
int s,a;
int main(){for(;scanf("%d",&a)!=EOF;)s+=(a<40)?8:a/5;printf("%d\n",s);}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
int main(void)
{
	int a[5]={0};
	for(int i=0;i<5;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]<40){
			a[i]=40;
		}
	}
	printf("%d\n",(a[0]+a[1]+a[2]+a[3]+a[4])/5);
	return 0;
}
//13:23.577 clear!!

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),n.end()
#define PI acos(-1)
using namespace std;
int main(){
  int sum=0;
  rep(i,5){
    int tmp;
    cin>>tmp;
    if(tmp<40)tmp=40;
    sum+=tmp;
  }
  cout<<sum/5<<endl;

}
/*int main(){
  int sum=0;
  int tmp;
  rep(i,5){
    cin>>tmp;
    if(tmp>=40)sum+=tmp;
    else sum+=40;
  }
  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;
		sum += a;
	}
	cout << sum / 5 << endl;
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

int d;
int res;

int main()
{
  rep(i, 5){
    cin >> d;
    res += max(d, 40);
  }

  cout << res / 5 << endl;

  return 0;
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;
using pll = pair<ll,ll> ;

const int mod = 1000000007;
constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

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

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