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 <bits/stdc++.h>
using namespace std;

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

    cout << sum / 5 << endl;

    return 0;
}

C++: /*#include <iostream>
using namespace std;
int main(){
	
	int A,B,C,D,E;
	cin >> A >> B >> C >> D  >> E;

	int answer;
	if (A < 0){
		answer = -A * C + D + B * E;
	}

	if (A > 0){
		answer = (B -A) * E;
	}

	cout << answer << endl;


		

}*/

#include <iostream>
using namespace std;
int main(){
	
	int A,B,C,D,E;
	cin >> A >> B >> C >> D >> E;

	int answer= 0;
	if (40 <= A){
		answer = answer+A;
	}

	if (40 > A ){
		answer = answer + 40;
	}

	if (40 <= B){
		answer = answer+B;
	}

	if (40 > B){
		answer = answer + 40;
	}

	if (40 <= C){
		answer = answer+C;
	}

	if (40 > C){
		answer = answer + 40;
	}
	
	if (40 <= D){
		answer = answer+D;
	}

	if (40 > D){
		answer = answer + 40;
	}

	if (40 <= E){
		answer = answer+E;
	}

	if (40 > E){
		answer = answer + 40;
	}


	cout << answer/5 << endl;


}

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

C++: #include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
	int a[10];
	int sum = 0;
	for (int i = 0; i < 5; i++) {
		cin >> a[i];
		if (a[i] < 40)a[i] = 40;
		sum += a[i];
	}
	cout << sum/5 << endl;
}

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

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

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

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

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

int main()
{
	int m = 0;

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

		if (a < 40)
			m += 40;
		else
			m += a;
	}

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

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

using namespace std;

int main() {
int a=0;
for(int i=0;i<5;i++){
int n;
if(n<40) n=40;
a=a+n;

}
cout<<a/5;
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <bits/stdc++.h>

typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n,m) for(int i=n;i<m;i++)
#define repn1(i,n,m) for(int i=n;i<=m;i++)
using namespace std;

const int INF = 1e+8;

int main(){

	int n;
	int ave[5];

	rep(i, 5){
		cin >> n;
		if(n <= 40) ave[i] = 40;
		else ave[i] = n;
	}
	n = 0;

	rep(i,5) n += ave[i];

	cout << n/5 << endl;


	return 0;
}

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

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

int main(){
	int a, sum = 0;

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

	cout<<sum/5<<endl;
	

	return 0;
}

C++: #include<iosteam>
using namespase 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>

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

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

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

  cout << (a+b+c+d+e)/5 << endl;
}

C++: // 2014/11/05 Tazoe

#include <iostream>
using namespace std;

int main()
{
	int sum = 0;

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

		if(s>=40){
			sum += s;
		}
		else{
			sum += 40;
		}
	}

	cout << sum/5 << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const ll INF=1e18;
const ll MOD=1e9+7;
const double pi=acos(-1);
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);  
  
  int sum=0;
  rep(i,5){
    int p;
    cin >> p;
    if(p>=40)sum+=p;
    else sum+=40;
  }
  cout <<sum/5 << endl;
}

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

int main(){

    double a,ans;

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

    cout << ans << endl;


    return 0;
}

C++: #include <iostream>

using namespace std;

int main ()
{
	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;
return 0;
}