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(void){

  int buf,res=0;

  for(int i=0;i<5;i++){
    cin >> buf;
    res += (buf < 40)? 40 : buf;
  }

  res /= 5;

  cout << res << endl;

  return 0;
}

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

using namespace std;

int main(void) {
  int s = 0;
  for (int i = 0; i < 5; i++) {
    int a;
    cin >> a;
    s += a < 40 ? 40 : a;
  }

  cout << s / 5 << endl;

  return 0;
}

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

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

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++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using PL = pair<ll, ll>;
// Welcome to my source code!

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

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

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

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

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>

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

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

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

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	int a, b=0;
	REP(i, 5) {
		in >> a;
		if (a <= 40)a = 40;
		b += a;
	}

	
	out << b/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;
}

C++: #include <iostream>
#include <fstream>
#include <typeinfo>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-10;
const vi emp;

int sum;

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

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>

int main(){
	int a, b, c, d, e;
	std::cin >> a >> b >> c >> d >> e;
	int sum = 0;
	sum += (a > 40 ? a : 40) + (b > 40 ? b : 40) + (c > 40 ? c : 40) + (d > 40 ? d : 40) + (e > 40 ? e : 40);
	std::cout << sum / 5 << std::endl;
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s; }


int a[5];

int main() {
    while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]) {
        int res = 0;
        for (int i = 0; i < 5; ++i) {
            if (a[i] < 40) a[i] = 40;
            res += a[i];
        }
        cout << res/5 << endl;
    }
    return 0;
}

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

using namespace std;

int main() {
    int sum = 0;
    for (int i = 0; i < 5; ++i) {
        int s;
        cin >> s;
        if (s < 40) s = 40;
        sum += s;
    }
    cout << sum / 5 << '\n';
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	int a, b=0;
	REP(i, 5) {
		in >> a;
		b += a;
	}

	
	out << b/5 << endl;
	return 0;

}