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 <stdio.h>
#include <cctype>
#include <limits.h>
#include <math.h>
#include <complex>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) static_cast<bitset<16> >(x);
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 1000000000;
const double EPS = 1e-8;
const double PI = 3.14159;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0592 : Average Score **/
int main()
{
	int N=0;
	rep(i, 5) {
		int a; cin>>a;
		N += max(40, a);
	}
	cout << N/5 << endl;
}

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

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

C++: #include "iostream"
#include "math.h"
#include "algorithm"
#include "string"
#include "vector"
#include "cmath"
using namespace std;

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

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int a[5];
	int h=0;
	for(int i=0;i<5;i++){
		cin>>a[i];
		if(a[i]<40)
			a[i]=40;
		h+=a[i];
	}
	cout<<h/5<<endl;
	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,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 <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;

int main() {
	vector<int> a(5);
	for (int& i : a) {
		cin >> i;
		i = max(40, i);
	}
	cout << accumulate(a.begin(), a.end(), 0) / 5 << endl;
}

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 += max(in,40);
}
cout << sum/5<<endl;
return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a, sum = 0;
		for (int i = 0; i < 4; i++) {
			cin >> a;
			sum += a;
	}
		cout << sum / 60 << endl << sum % 60 << endl;
}
/*#include<iostream>
using namespace std;
int main() {
	int min1 = 2000, min2 = 2000, a;
	for (int i = 0; i < 3; i++) {
		cin >> a;
		if (min1 > a)min1 = a;
	}
	for (int i = 0; i < 2; i++) {
		cin >> a;
		if (min2 > a)min2 = a;
	}
	cout << min1 + min2-50 << endl;
}*/
/*#include<iostream>
using namespace std;
int main() {
	int a[5], b[2] = {1}, sum = 0;
	for (int i = 0; i < 5; i++) {
		cin >> a[i];
	}
	while (a[1] > a[3]*b[0]) {
		b[0]++;
		//cout << "bakatoy" << endl;
	}
	while (a[2] > a[4]*b[1]) {
		b[1]++;
		//cout << "bakatoy" << endl;
	}
	if (b[0] > b[1]) {
		cout << a[0]-b[0] << endl;
	}
	else {
		cout << a[0]-b[1] << endl;
	}
}*/

C++: #include<iostream>
using namespace std;
int main() {
	int p[5];
	int a = 0, b = 0;
	for (int i = 0; i < 5; ++i) {
		cin >> p[i];
		if (p[i] < 40) {
			p[i] = 40;
		}
		a = a + p[i];
	}
	b = a / 5;
	cout << b << endl;
	system("pause");
}

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

int main(){


	int a,b,c,d,e;
	cin >> a >> b >> c >> d >> e ;


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





	/*
	int a,b,c,d,e; 
	cin >> a >> b >> c >> d >> e;
	int answer;


	if(a<0){
		answer=-a*c+e*b+d;
	      }

	if(a>0){
		answer=e*b-e*a;
	}
	cout << answer <<endl;
	*/

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a; i ++)
int main(void){
  int sum = 0;
  rep(i,5){
    int in;
    cin>>in;
    in += sum;
  }
  cout<<sum / 5 << endl;
  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++: #include<iostream>
using namespace std;

int main()
{
int a,b,c,d,e;
cin>>a;
cin>>b;
cin>>c;
cin>>d;
cin>>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<stdio.h>
int main(void)
{
	int a,s,d,f,g,w;
	scanf("%d %d %d %d %d",&a,&s,&d,&f,&g);
	if(a<40){
	a=40;
	}
	if(s<40){
	s=40;
	}
	if(d<40){
	d=40;
	}
	if(f<40){
	f=40;
	}
	if(g<40){
	g=40;
	}	
	w=(a+s+d+f+g)/5;
	printf("%d\n",w);
	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,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 <stdio.h>
int main () {
    int data[5],i,avg;
    int sum = 0;
    for (i = 0; i < 5; i++) {
        scanf("%d",&data[i]);
    }
    for (i = 0; i < 5; i++) {
        if(data[i] < 40) {
            data[i] = 40;
        }
        sum = sum + data[i];
    }
    avg = sum / 5;
    printf("%d\n",avg);
}

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

C++: #include<iostream>
using namespace std;
int main(){
	int a,b,c,d,e,s;
	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;}

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

	cout<<s<<endl;

	return 0;
}

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