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 stu[5];
	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 <stdio.h>

int main(){
	int A,B,C,D,E,sum,average = 0;
	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;
	}
	sum = A+B+C+D+E;
	average = sum/5;
	printf("%d\n",average);
	return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std ;
int main()
{
    int score = 0 ;
    int total = 0 ;
    for ( int i = 0 ; i < 5 ; i++ )
    {
        cin >> score ;
        if (score < 40) score = 40 ;
        total += score ;
    }
    cout << total / 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;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
	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 <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10
#define MAX_N 20000
#define MAX_M 16

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

int a;

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

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

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

C++: #include<iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <cmath>
#include <set>
#include <string.h>
#include <functional>

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<iostream>
using namespace std; 

int main(){
  int a[5];
  int b;
  for(int i; i<5; i++){
    cin>>a[i];
    b=b+a[i];
      }
  cout<<b/5<<endl;
}

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

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

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

	return 0;
}

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

int main(){
int a=0;
int b;
for(int c=0;c<5;c++){
	scanf("%d",&b);
	if(b<40)b=40;
	a+=b;
}
printf("%d\n",a);
}

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

template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}
bool is_prime(ll n) {
  for (ll i = 2; i*i <= n; i++) {
    if (n%i == 0) return false;
  }
  return n != 1;
}
ll mod_pow(ll x, ll n, ll mod) {
  if (n == 0) return 1;
  ll res = mod_pow(x*x%mod, n/2, mod);
  if (n & 1) res = res * x % mod;
  return res;
}

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

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

int main() {
    int ans = 0;
    for (int i = 0; i < 5; i++) {
        int a;
        cin >> a;
        ans += max(a, 40) / 5;
    }
    cout << ans << 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 << 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;
}