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

C++: #include <iostream>

using namespace std;

int main ()
{
	int a[300],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<stdio.h> 
int main(void){int a,i,h,m;int t[5];for(i=1;i<=5;i++){scanf("%d",&t[i]);if(t[i]<40){t[i]=40;}a+=t[i];h=a/5;}		printf("%d\n",h);return 0;}

C++: #include <iostream>
#include <algorithm>
using namespace std;
 
int main() {
  int n, m;
   
  cin >> n >> m;
  int A[1000], B[1000];
  for(int i=0; i<n; i++) {
    cin >> A[i];
  }
   
  int cnt[1000]={};
   
  for(int i=0; i<m; i++) {
    cin >> B[i];
  }
   
  for(int j=0; j<m; j++) {
      for(int i=0; i<n; i++) {
    if(B[j] >= A[i]) {
      cnt[i] ++;
      break;
    }
      }
  }
 
   
   
  int mx = 0, num = 0;
  for(int i=0; i<n; i++) {
    if(mx < cnt[i]) {
      num = i;
      mx = cnt[i];
    }
  }
   
  cout << num + 1 << endl;
   
  return 0;
}

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

C++: #include <stdio.h>

int main(void){
	int t,j,sa,shi,h;
	int ans;
	
	scanf("%d %d %d %d %d",&t,&j,&sa,&shi,&h);
	if(t<40){
		t=40;
	}
	if(j<40){
		j=40;
	}
	if(sa<40){
		sa=40;
	}
	if(shi<40){
		shi=40;
	}
	if(h<40){
		j=40;
	}
	
	ans=(t+j+sa+shi+h)/5;
	
	printf("%d\n",ans);
	
	
	
	
	
	
	return 0;
}

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

using namespace std;

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

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

C++: #include <stdio.h>

int main(void)
{
	int w,a,b,c,d,e;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	scanf("%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);}
	w=(a+b+c+d+e)/5;
	printf("%d%",w);
	return 0;
}

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

int main() {
	int ten[5],goukei = 0;
	for(int i = 0; i < 5; i++){
		cin >> ten[i];
		if(ten[i] < 40){
			ten[i] = 40;
		}
		goukei = goukei + ten[i];
	}
	cout << goukei / 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;
	}
	sum/=5;
	printf("%d\n",sum);
}

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

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

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

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

	for(int i = 0; i < 5; i++){
		sum += x[i];
	}

	cout << sum / 5 << endl;

}

C++: #include <cstdio>

int a,b,c,d,e,sum;
int s[5];
int i=0,j=0;
int main (){
		for (i=0;i<5;i++){
			scanf("%d",&s[i]);
		}
		sum=0;
		for(j=0;j<5;j++){
			if(40>s[j]) sum=sum+40;
			else  sum=sum+s[j];
			}
		printf("%d\n",sum/5);
	return 0;
}

C++: #include<iostream>

using namespace std;


int main(void){

	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>

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

using namespace std;


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

C++: #include<iostream>

using namespace std;

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

  return 0;
}

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
#define rall(n) n.rbegin(),n.rend()
typedef long long ll;
//typedef complex<double>P;
const ll INF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-10;
const double pi = acos(-1);//3.1415926535897932384626433832795028...
const ll SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
ll fac[200005], finv[200005], inv[200005];
vector<ll>dij;
struct edge { ll to, cost; };
vector<vector<edge> >G;

ll mod_pow(ll a, ll b) {
	ll res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}
	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

template<typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }

template<typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}

template<typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T &t, const V &v) { t = v; }

template<typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T &t, const V &v) {
	for (auto &e : t) fill_v(e, v);
}

template<typename T>
void outp(vector<T>v) {
	for (int i = 0; i < v.size(); ++i) {
		cout << v[i];
		if (i != v.size() - 1) { cout << " "; }
	}
}

double add(double a, double b) {
	if (abs(a + b) < EPS*(abs(a) + abs(b))) { return 0; }
	return a + b;
}


//↑template↑

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

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

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

int main(){

	int answer;
	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;


	/*
	int datanum = 0;
	for(int dataset = 0; dataset < 1; dataset++){
		if(input == 0) break;


		answer[dataset] = sum;

		datanum++;
	}

	for(int dataset = 0; dataset < datanum; dataset++){
		cout << answer[dataset] << endl;
	}
	*/

	

	return 0;
}

C++: #include <stdio.h>

int main(void){
	int t,j,sa,shi,h;
	int ans;
	
	scanf("%d %d %d %d %d",&t,&j,&sa,&shi,&h);
	if(t<40){
		t=40;
	}
	if(j<40){
		j=40;
	}
	if(sa<40){
		sa=40;
	}
	if(shi<40){
		shi=40;
	}
	if(h<40){
		h=40;
	}
	
	ans=(t+j+sa+shi+h)/5;
	
	printf("%d\n",ans);
	
	
	
	
	
	
	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) sum += n;
    else sum += 40;
  }
  cout << sum/5 << endl;
}

C++: i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);}