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 <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    vi v(5,0);
    rep(i,5){cin>>v[i]; v[i]<40 ? v[i]=40:v[i]=v[i];}
    rep(i,5)if(i)v[i]+=v[i-1];
    //cout<<v[4]<<endl;
    cout<<v[4]/5<<endl;
}

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

using namespace std;

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

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

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<cstdlib>
using namespace std;

int main() {
  int a;
  double ans = 0;
  for(int i = 0; i < 5; i++) {
    cin >> a;
    ans += a < 40 ? 40 : a;
  }
  cout << ans / 5 << endl;
}

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

int main(){

  int a[4], i, m=0;

  for ( i=0; i<5; i++){
    cin >> a[i];
    if (a[i]<40){
      a[i]=40;
	}
    m+=a[i];
  }

  cout << m/5 << endl;

  return 0;

}

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

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a[5],b;
    for(int i=0;i<5;i++){
        cin >> b;
        if(b<40){a[i]=40;}
        else a[i]=b;
    }
    int ans=0;
    for(int i=0;i<5;i++){
        ans+=a[i];
    }
    cout << ans/5 << endl;


    return 0;
}

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

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

int score[5];

signed main()
{
	rep(i,5) cin >> score[i];
	rep(i,5) if (score[i] < 40) score[i] = 40;
	int sum = 0;
	rep(i,5) sum += score[i];
	cout << sum / 5 << endl;
}

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

int main(){
    int ans = 0;

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

    ans /= 5;

    cout << ans << endl;

    return 0;
}

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

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

int main() {
	int s[5];
	REP(i,5) {
		cin >> s[i];
		if (s[i] < 40) s[i] = 40;
	}

	int total = 0;
	REP(i,5) total += s[i];

	cout << total / 5 << endl;

	return 0;
}

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;
  }
  a = a/5;
  cout << a<< endl;

  return 0;
}

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

using namespace std;

int main(){
    vector<int> n(5);
    for(int i = 0; i < 5; i++){
        cin >> n[i];
    }
    int total = 0;
    for(int i = 0; i < 5; i++){
        if(n[i] < 40){
            total += 40; //40点以下は一律40点としてカウント
        }
        else{
            total += n[i];
        }
    }
    cout << total / 5 << endl;
}

C++: //
//  main.cpp

#include <iostream>
using namespace std;


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

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

using namespace std;


int main(){

	int sum = 0,tmp;

	for(int i = 0; i < 5; i++){
		scanf("%d",&tmp);

		if(tmp >= 40)sum += tmp;
		else sum += 40;
	}

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

    return 0;
}

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

using namespace std;

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

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

int main(){
	int a[5];
	
	for(int i = 0; i < 5; i++){
		scanf("%d", &a[i]);
		if(a[i] < 40) a[i] = 40;
	}
	
	printf("%d\n", (a[0] + a[1] + a[2] + a[3] + a[4]) / 5);
	
	return 0;
}

C++: #include<stdio.h>

int average(int a[])
{
  int i,sum=0;
  for(i=0;i<5;i++){
    if(a[i]<40){
      a[i]=40;
    }
    sum=sum+a[i];
  }
  return(sum/5);
}

int main(void)
{
  int a[5];
  int s;
  int i;
  for(i=0;i<5;i++){
    scanf("%d",&a[i]);
  }

  s=average(a);
  printf("%d\n",s);
  return(0);
}

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

C++: // AOJ 0592
#include <iostream>
#include <cmath>

using namespace std;

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

	return 0;
}

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

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

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

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

using namespace std;
const static int N = 5;
const static int BOTTOM = 40;

int main() {
  int sum = 0;
  for( int i = 0; i < N; i++ ) {
    int score;
    cin >> score;
    sum += max( BOTTOM, score );
  }
  cout << sum / N << endl;

  return EXIT_SUCCESS;
}

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