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 <iostream>
using namespace std;

int main(){
  while(1){
    int sum = 0;
    for(int i = 0; i < 5; i++){
      int x;
      if(!(cin >> x)) return 0;
      sum += (x >= 40 ? x : 40);
    }
    cout << sum / 5 << endl;
  }
}

C++: #include <iostream>
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<bits/stdc++.h>
int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=max(40,a);}std::cout<<s/5<<endl;}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,j) FOR(i,0,j)

const int INF = 1 << 24;
const int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};

typedef unsigned long long ull;

int main(){
    int a[5];

    REP(i, 5){
        std::cin >> a[i];
    }

    int sum = 0;
    REP(i, 5){
        if(a[i] < 40){
            a[i] = 40;
        }
        sum += a[i];
    }

    std::cout << sum / 5 << std::endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int score[6],sum=0;
    for(int i=0;i<5;++i){
        scanf("%d",&score[i]);
    }
    for(int i=0;i<5;++i){
        if(score[i] < 40){
            score[i]=40;
            sum+=score[i];
        }else{
            sum+=score[i];
        }
    }
    printf("%d\n",sum/=5);
    return 0;
}

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

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

C++: #include<iostream>
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<<'\n';
 
return 0;
}

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

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

using namespace std;


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

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

  return 0;
}

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

C++: #include<stdio.h>

int main(){
 int data[10], i, sum = 0, ave;
 for(i = 1, i <= 5, i++){
  scanf("%d", &data[i]);
 if(data[i] < 40) data[i] = 40;
 sum += data[i];
 }
 ave = sum / 5;
 printf("%d", ave);
 return 0;
}

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

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

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 "bits/stdc++.h"

using namespace std;

const char en = '\n';
using  ll =          long long;
using ull = unsigned long long;
#define REP(i  ,n) for(int i=0;i<n;i++)
#define FOR(i,s,g) for(int i=s;i<g;i++)
const ll INFL = 810810191911451400;
const int INF =       1919114514;

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

	int sum=0,buf;
	REP(i, 5){
		cin>>buf;
		sum+=max(buf,40);
	}
	cout<<sum/5<<en;
	return 0;
}

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

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

using namespace std;

int main(void){
	int a=0,b;
	for(int i=0;i<5;i++){
		scanf("%d",&b);
		a+=max(b,40);
	}
	printf("%d\n",a/5);
	return 0;
}

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

int main(){
    int s[5];
    int sum = 0;

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

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

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

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

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

  cout << sum / 5 << endl;
}

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

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

  return 0;
}

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

int main(){
    int a[5],memo = 0;
    
    rep(i,0,5){
        cin >> a[i];
        memo += max(a[i],40);
    }
    
    
    cout << memo/5 << endl;
    
    
    return 0;
}

C++: // 2014/07/28 Tazoe

#include <iostream>
using namespace std;

int main()
{
	int sum = 0;

	int p1;
	cin >> p1;
	if(p1<40){
		p1 = 40;
	}
	sum += p1;

	int p2;
	cin >> p2;
	if(p2<40){
		p2 = 40;
	}
	sum += p2;

	int p3;
	cin >> p3;
	if(p3<40){
		p3 = 40;
	}
	sum += p3;

	int p4;
	cin >> p4;
	if(p4<40){
		p4 = 40;
	}
	sum += p4;

	int p5;
	cin >> p5;
	if(p5<40){
		p5 = 40;
	}
	sum += p5;

	cout << sum/5 << '\n';

	return 0;
}

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

int main(){
    int res = 0, a;
    for(int i = 0; i < 5; i++){
        scanf("%d", &a);
        res += max(a, 40);
    }
    printf("%d\n", res /  5);
    return 0;
}

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

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define all(i) (i).begin(),(i).end()
#define pb push_back
#define mp make_pair

typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;

/*-------------------------------*/

int main(void)
{
  int a, b = 0;
  rep(i, 5){
    cin >> a;
    if (a < 40) a = 40;
    b += a;
  }

  cout << b / 5 << endl;

  return 0;
}

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

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