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 <algorithm>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

int a, b, c, d, e;
int main() {
  cin >> a >> b >> c >> d >> e;
  cout << (max(a, 40) + max(b, 40) + max(c, 40) + max(d, 40) + max(e, 40)) / 5 << "\n";
  return 0;
}

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

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

C++: #include <iostream>
#include <numeric>

#define N 5

using namespace std;

int main()
{
  int scores[N];

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

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

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

  return 0;
}

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

int remedial( int a )
{
    if( a < 40 )
        return 40;
    else
        return a;
}

int main()
{
    int a, b, c, d, e;

    cin >> a >> b >> c >> d >> e;
    
    cout << ( remedial(a) + remedial(b) + remedial(c) + remedial(d) + remedial(e) ) / 5  << endl; 
    
    return 0;
}

C++: #include<stdio.h>

int main(){
 int data[10], i, sum, ave;
 for(i = 1, i <= 5, i++){
  scanf("%d", &data[i]);
 if(data[i] < 40) data[i] = 40;
 sum += data[i];
 }
 ave = sum / 5;
 printf("%d", ave);
 return 0;
}

C++: #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(),(a).end()
#define MOD 10000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const ull B=100000007;
const int INF=1e9;
int main(){
      int ans=0,a;
      REP(i,5){
            cin>>a;
            if(a<40)a=40;
            ans+=a/5;
            cout<<ans<<endl;
      }
      cout<<ans<<endl;
}

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

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

C++: #include<stdio.h>
#include <iostream>
#include<string>
#include<algorithm>
#include<sstream>
#include<math.h>
using namespace std;
int main() {
	int a[5];
	int ans=0;
	for (int i = 0; i < 5; i++) {
		cin >> a[i];
		if (a[i] < 40)a[i] = 40;
		ans += a[i] / 5;
	}
	cout << ans << endl;
	return 0;
}

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

int main(){
  while(1){
    int sum = 0;
    for(int i = 0; i < 5; i++){
      int x;
      if(!(cin >> x)) return 0;
      sum += (x >= 40 ? x : 40);
    }
    cout << sum / 5 << endl;
  }
}

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; }
	cout << (a + b + c + d + e) / 5 << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}std::cout<<s/5<<endl;}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>

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

const int INF = 1 << 24;
const int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};

typedef unsigned long long ull;

int main(){
    int a[5];

    REP(i, 5){
        std::cin >> a[i];
    }

    int sum = 0;
    REP(i, 5){
        if(a[i] < 40){
            a[i] = 40;
        }
        sum += a[i];
    }

    std::cout << sum / 5 << std::endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int score[6],sum=0;
    for(int i=0;i<5;++i){
        scanf("%d",&score[i]);
    }
    for(int i=0;i<5;++i){
        if(score[i] < 40){
            score[i]=40;
            sum+=score[i];
        }else{
            sum+=score[i];
        }
    }
    printf("%d\n",sum/=5);
    return 0;
}

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

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

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;


cout<<(a+b+c+d+e)/5<<'\n';
 
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;
  }
  sum  = sum/5;
  cout << sum<< endl;

  return 0;
}

C++: #include<bits/stdc++.h>
int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}printf("%d\n",s/5);}

C++: #include<stdio.h>

int main(){
 int data[10], i, sum = 0, ave;
 for(i = 1, i <= 5, i++){
  scanf("%d", &data[i]);
 if(data[i] < 40) data[i] = 40;
 sum += data[i];
 }
 ave = sum / 5;
 printf("%d", ave);
 return 0;
}

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

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

C++:  //JOI13-quest1.cpp  Defines the entry point for the console application.

#include <stdio.h>

int main(void)
{
	int temp, sum = 0;
	for (int i = 0; i < 5; i++) {
		scanf("%d", &temp);

		if (temp == 40) {
			sum += temp;
		}
		else {
			sum += 40;
		}
	}

	printf("%d\n" sum / 5);

	return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

const char en = '\n';
using  ll =          long long;
using ull = unsigned long long;
#define REP(i  ,n) for(int i=0;i<n;i++)
#define FOR(i,s,g) for(int i=s;i<g;i++)
const ll INFL = 810810191911451400;
const int INF =       1919114514;

int main(){
	ios::sync_with_stdio(false);cin.tie();

	int sum=0,buf;
	REP(i, 5){
		cin>>buf;
		sum+=max(buf,40);
	}
	cout<<sum/5<<en;
	return 0;
}

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

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

using namespace std;

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

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

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

    for(int i = 0; i < 5; i++){
        cin >> s[i];
        if(s[i] < 40) s[i] = 40;
        sum += s[i];
    }
    cout << (sum / 5) << endl;
    
    return 0;
}

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

C++: #include <cstdio>
int main(){
    int a,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);
}