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;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}

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

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair
#define each(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 24;

int main(void){
    vi a(5);
    for(; cin >> a[0];){
        range(i, 1, 5) cin >> a[i];

        int sum = 0;
        rep(i, 5){
            sum += max(40, a[i]);
        }

        cout << sum / 5 << endl;
    }

	return 0;
}

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

C++: #include <stdio.h>

#define max(a,b) (a < b ? b : a)

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

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

int main() {

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

  cout << ans / 5 << endl;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
int a,b,c,d,e;
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
printf("%d\n",(max(40,a)+max(40,b)+max(40,c)+max(40,d)+max(40,e))/5);
}

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 ;

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int i;
	int p;
	int total;
	
	total = 0;
	for (i = 0; i < 5; i++){
		scanf("%d", &p);
		if (p < 40){
			p = 40;
		}
		total += p;
	}
	printf("%d\n", total / 5);
	
	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;
}

C++: #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f

#include <iostream>
#include <cstdio>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
#include <cctype>
#include <utility>
  
using namespace std;
  
typedef long long ll;
typedef pair <int,int> P;
typedef pair <int,P> PP;
  
static const double EPS = 1e-8;
  
static const int tx[] = {0,1,0,-1};
static const int ty[] = {-1,0,1,0};

int main(){

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

C++: #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
 
//const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
//const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
 
int main()
{
	int tmp, sum = 0;
	REP(i, 5){
		cin >> tmp;
		if (tmp < 40) sum += 40;
		else sum += tmp;
	}

	cout << sum / 5 << endl;
}

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

using namespace std;

int main(){
    int ans=0,n=5,t;
    while(n--){
        cin>>t;
        ans+=max(40,t);
    }
    cout<<ans/5<<endl;
    return 0;
}

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

int A = (a+b+c+d+e)/5;


cout<<A<<endl;

return 0;
}

C++: #include <iostream>

using namespace std;

int main ()
{
	int a,con;

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

	cout << con / 5 << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <string>

using namespace std;

int main(void)
{	
	int score,sum = 0;
	while (cin >> score)
	{
		if (score < 40)
		{
			sum += 40;
		}
		else
		{
			sum += score;
		}
	}
	cout << sum / 5 << endl;

}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,x;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
	x=(a+b+c+d+e)/5;
	printf("%d\n",x);
	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);
  }

  int sum = accumulate(scores, scores+N, 0);
  cout << sum << endl;

  cout << ((sum == 0)? 0 : sum/N) << endl;

  return 0;
}

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

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

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

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

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

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

    cout << sum / 5 << endl;

    return (0);
}

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

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

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

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

    cout << sum / 5 << endl;

    return (0);
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int a[5];
	for (int i = 0; i < 5; i++)
	{
		cin >> a[i];
		if (a[i] < 40)
		{
			a[i] = 40;
		}
	}
	cout << (a[1] + a[2] + a[3] + a[4] + a[5]) / 5 << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int main ()
{
	int a,con;

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

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

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

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

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