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


  int sum=0;
  int point;

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

  cout << sum/5 << endl;

  return 0;
}

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

int main(){

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


  return 0;
}

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

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

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

using namespace std;

#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

int main() {
	int total = 0;
	int point;
	rep(i, 5) {
		scanf("%d", &point);
		total += (point >= 40) ? point : 40;
	}
	printf("%d\n", total / 5);
	return 0;
}

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

int main() {
    int sum=0, t;
    for (int i = 0; i < 5; i++) {
        scanf("%d", &t);
        (t > 40) ? sum+= t : sum+=40;
    }
    printf("%d\n", sum/5);
    return 0;
}

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

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

  cout << ans/5 << endl;
}

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

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

int main(){
  int a, b, c, d, e ,sum;
  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;

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

  cout << sum << endl;
}

C++: #include <iostream>

using namespace std;

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

	return 0;
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int sum = 0;
	for(int i = 0; i < 5; ++i){
		int score;
		cin >> score;
		if(score < 40)
			score = 40;
		sum += score;
	}
	
	cout << sum / 5 << endl;
		
	return 0;
}

C++: ans = 0
for i in range(5):
    ans += max(40,int(input())) // 5
print(ans)

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

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

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

C++: #include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;

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

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<iostream>
int a,s,i;main(){for(i=0;i<5;i++){std::cin>>a;s+=a;}printf("%d\n",s/5);}

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

C++: #include<iostream>
using namespace std;
int main(){
	
	int a,b,c,d,e,f,x;

	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<<endl;

return 0;
}

C++: #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <ostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define INF 1000000000
#define rep(i,a,b) for (int i=(a);i<(b);i++)
#define rev(i,a,b) for (int i=(a)-1;i>=b;i--)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef queue<int> qi;
typedef vector<int> vi;
typedef vector<string> vs;
int dx[4] = { 0, 1, 0, -1 };
int dy[4] = { 1, 0, -1, 0 };

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

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

	return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main()
{

	int a, b, c, d, e, f;

	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;

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

	cout << f << endl;

}

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

int main()
{
	int ta,ji,sa,si,ha,total=0;
	cin >> ta >> ji >> sa >> si >> ha;

	if(ta>=40){
		total += ta;
	}else{
		total += 40;
	}
	if(ji>=40){
		total += ji;
	}else{
		total += 40;
	}
	if(sa>=40){
		total += sa;
	}else{
		total += 40;
	}
	if(si>=40){
		total += si;
	}else{
		total += 40;
	}
	if(ha>=40){
		total += ha;
	}else{
		total += 40;
	}
	cout << total/5 << "\n";
	return 0;
}

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

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

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  vi v(5);
  rep(i, 5) {
    cin >> v[i];
    v[i] = max(40LL, v[i]);
  }
  cout << accumulate(all(v), 0) / 5 << endl;
}