Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	return n
}

func main() {
	sc.Split(bufio.ScanWords)

	sum := 0
	for i := 0; i < 5; i++ {
		x := nextInt()
		if x < 40 {
			sum += 40
		} else {
			sum += x
		}
	}
	fmt.Println(sum / 5)
}

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

int main() {
	int cnt = 0;
	rep(i, 5) {
		int a; cin >> a;
		cnt += max(a, 40);
	}
	cout << cnt / 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(){
  int a,t=0;
  rep(i,5){
    cin>>a;
    if(a<=40)a=40;
    t+=a;
  }
  cout<<t/5<<endl;
}

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

int main() {
	ios :: sync_with_stdio(false);
	int sum = 0;
	for(int i = 0; i < 5; i ++) {
		int x; cin >> x;
		if(x <= 40)
			x = 40;
		sum += x;
	}
	cout << sum / 5 << '\n';
	return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
typedef pair<int,int> pii;
#define ITR(v,c) for(auto v=begin(c);v!=end(c);v++)
#define FOR(v,a,n) for(int v=a;v<(int)(n);v++)
#define FORE(x,arr) for(auto &x:arr)
#define REP(v,n) FOR(v,0,n)
#define RREP(v,n) for(int v=(int)(n);v>=0;v--)
#define ALL(c) begin(c),end(c)
const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0};
const int INF = 1e9;
const ll INFLL = 1e18;
template<class T,class U>ostream&operator<<(ostream &os,const pair<T,U> &p){
    os<<"("<<p.first<<","<<p.second<<")";return os;}
template<class T>ostream&operator<<(ostream &os,const vector<T> &v){
    ITR(i,v)os<<*i<<(i==end(v)-1?"":" ");return os;}
//------------------------------------------------------------------------------

signed main() {
    vector<int> s(5);
    FORE(x,s) cin>>x;
    cout<<accumulate(ALL(s),0)/5<<endl;
    return 0;
}

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

using namespace std;

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

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

int main(){
	int i,ave,tmp,sum = 0;

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

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

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

  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;

}

C++: #include<iostream>
#include<algorithm>
//#include<cmath>
//#include<string>
//#include<cctype>
//#include <vector>
using namespace std;
int main() {
	int s = 0,a;
	for (int i = 0; i < 5; i++)cin >> a, s += max(40, a);
	cout << s / 5 << endl;
	return 0;
}

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

#define D(x) cout << #x " is " << (x) << endl
#define rep(i,n) for(int i = 0; i < n; i++)
#define all(c) (c).begin(),(c).end()
#define foreach(it, c) for(__typeof__((c).begin()) it=(c).begin();it!=(c).end();it++)

using namespace std;

int main(void){

  int a,ans=0;

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

  cout << ans/5 << endl;

  return 0;
}

C++: #include<iostream>
#define N 5
#define M 40

using namespace std;

int main(){
  int x, ans=0;
  for(int i=0; i<N; ++i){
    cin >> x;
    ans += (x>M ? x : M);
  }
  cout << ans/N << endl;
  return 0;
}

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

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

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