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

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

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

C++: #include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main(void){

  int ans=0,a;

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

  cout << ans/5 << endl;

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c, d, e,f;
cin >> a, b, c, d, e;
 f =(a + b + c + d + e) / 5;
cout << f<< endl;
}

C++: 5.times{n=gets.to_i;m+=n}p m/5

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

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

C++: #include<stdio.h>

int main(){
int s=0,x;
for(int i=0;i<5;i++)
{scanf("%d",&x);if(x<40)x=40;s+=x;}

printf("%d\n",s/5);
return 0;
}

C++: 
/* vo05_592.cpp */
#include <iostream>
using namespace std;

int main()
{
	int sum, score;

	sum = 0;
	for (int i = 0; i < 5; ++i) { 
		cin >> score;
		
		if (score < 40) score = 40;

		sum += score;
	}
	
	cout << sum / 5 << '\n';

	return 0;
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
	int sum = 0;
	for (int i = 0; i < 5; ++i) {
		int a; cin >> a;
		sum += max(a, 40);
	}
	cout << sum / 5 << endl;
	return 0;
}

C++: 
#include <stdio.h>
#include <math.h>
#include <algorithm>

using namespace std;

int main() {

	int s = 0;

	for (int i = 0; i < 5; i++) {
		int t;
		scanf("%d", &t);
		s += max(40, t);
	}

	printf("%d\n", s / 5);

	return 0;
}

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

#define for_(i,a,b) for(int i=(a);i<(b);++i)

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

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

using namespace std;

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

int main() {
    int ans = 0;

    REP(i, 5) {
        int a;
        cin >> a;
        ans += max(a, 40);
    }

    ans /= 5;
    cout << ans << endl;
    return 0;

}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

int main()
{
  int sum = 0;
FOR(i,0,5) {
int in; cin >> in;
sum += in;
}
cout << sum/5<<endl;
return 0;
}

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

typedef long long ll;
typedef pair<int, int> P;
#define MOD 1000000007
#define INF (1 << 30)
#define REP(i, m, n) for(int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)


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

    int sum = 0;
    rep(i, 5) {
        int a; cin >> a;
        a = max(a, 40);
        sum += a;
    }
    cout << sum/5 << '\n';
    return 0;
}

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

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

using namespace std;

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

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

using std::cin;
using std::cout;
using std::endl;
using std::array;
using std::for_each;
using std::accumulate;

int main() {
	array<int,5> score;
	for_each(score.begin(),score.end(),[](int &s){
		cin >> s;
		if (s < 40) {
			s = 40;
		}
	});
	cout << accumulate(score.begin(),score.end(),0)/5 << endl;
}

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

#define times(n, i)      uptil(0, n, i)
#define upto(f, t, i)    for(decltype(t) _##i = (t), i = (f); i <= _##i; i++)
#define uptil(f, t, i)   for(decltype(t) _##i = (t), i = (f); i < _##i; i++)
#define downto(f, t, i)  for(decltype(t) _##i = (t), i = (f); i >= _##i; i--)
#define downtil(f, t, i) for(decltype(t) _##i = (t), i = (f); i > _##i; i--)
#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define all(v) v.begin(), v.end()
#define ln << "\n"

struct line{};

template<class T> istream& operator>>(istream& in, vector<T>& v) {
    times(v.capacity(), i) in >> v[i];
    return in;
}

template<class T> const ostream& operator<<(ostream& out, const vector<T>& v) {
    times(v.size(), i) out << (i ? " " : "") << v[i];
    return out;
}

template<class T, class...U> typename enable_if<is_same<T, line>::value, string>::type next(istream& in, const U&... args) {
    string s;
    getline(in, s, args...);
    return move(s);
}

template<class T, class...U> typename enable_if<!is_same<T, line>::value, T>::type next(istream& in, const U&... args) {
    T t(args...);
    in >> t;
    return move(t);
}
template<class T, class...U> auto next(const U&... args) -> decltype(next<T>(cin)) {
    return next<T>(cin, args...);
}

template<class T> T sum(const vector<T>& v) {
    T ans = T();
    for(const T& t : v) ans += t;
    return ans;
}

template<class T> T sum(const typename vector<T>::iterator& begin, const typename vector<T>::iterator& end) {
    T ans = T();
    for(typename vector<T>::iterator t = begin; t != end; t++) ans += *t;
    return ans;
}

template<class T> T min(const vector<T>& v) {
    return *min_element(v.begin(), v.end());
}

template<class T> T min(const typename vector<T>::iterator& begin, const typename vector<T>::iterator& end) {
    return *min_element(begin, end);
}

template<class T> T max(const vector<T>& v) {
    return *max_element(v.begin(), v.end());
}

template<class T> T max(const typename vector<T>::iterator& begin, const typename vector<T>::iterator& end) {
    return *max_element(begin, end);
}

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

    auto P = next<vector<int>>(5);
    for(int& p : P) if(p < 40) p = 40;
    cout << sum(P) / P.size() ln;

    return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

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

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

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

int main()
{

	int SumScore, Score;

	SumScore = 0;

	for( int i = 0; i < 5; i++ ) {
		
		cin >> Score;

		if( Score >= 40 ) SumScore += Score;
		else			  SumScore += 40;

	}

	cout << SumScore / 5 << endl;

	return 0;

}

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