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 <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <valarray>
#include <iterator>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) container.begin(), container.end()
#define RALL(container) container.rbegin(), container.rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int n;

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

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

int main(int argc, char *argv[]){
  int ave = 0;
  int n;
  for (int i = 0; i < 5; i++) {
    cin >> n;
    if(n < 40)n = 40;
    ave += n;
  }
  std::cout << ave / 5 << std::endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
typedef pair<int,int> pii;
#define ITR(v,c) for(auto v=begin(c);v!=end(c);v++)
#define FOR(v,a,n) for(int v=a;v<(int)(n);v++)
#define FORE(x,arr) for(auto &x:arr)
#define REP(v,n) FOR(v,0,n)
#define RREP(v,n) for(int v=(int)(n);v>=0;v--)
#define ALL(c) begin(c),end(c)
const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0};
const int INF = 1e9;
const ll INFLL = 1e18;
template<class T,class U>ostream&operator<<(ostream &os,const pair<T,U> &p){
    os<<"("<<p.first<<","<<p.second<<")";return os;}
template<class T>ostream&operator<<(ostream &os,const vector<T> &v){
    ITR(i,v)os<<*i<<(i==end(v)-1?"":" ");return os;}
//------------------------------------------------------------------------------

signed main() {
    vector<int> s(5,0);
    FORE(x,s) cin>>x, x=max(x,40);
    cout<<accumulate(ALL(s),0)/5<<endl;
    return 0;
}

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


int main(){
  vector<int> m;
  m.clear();
  for(int i = 0;i<5;i++){
    int n;
    cin>>n;
    m.push_back(n);
  }
  int ans = 0;
  for(int i=0;i<m.size();i++){
    ans+=max(40,m[i]);
  }
  cout<<ans/m.size()<<endl;

}

C++: #include<iostream>

int main()
{
  int a[5], sum = 0;
  for(int i = 0; i < 5; i++) {
    scanf("%d", &a[i]);
    if(a[i] < 40)
      a[i] = 40;
    sum += a[i];
  }
  double ans = (double)sum / 5.0;
  printf("%lf\n", ans);
  return 0;
}

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

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

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

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

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

int main() {
	ios :: sync_with_stdio(false);
	int sum = 0;
	for(int i = 0; i < 5; i ++) {
		int x; cin >> x;
		if(x <= 40)
			x = 40;
		sum += x;
	}
	cout << sum / 5 << '\n';
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int t[5],sum;
  sum=0;
  for(int i=0;i<5;i++){
    cin>>t[i];
    if(t[i]>=40){
      sum+=t[i];
    }else{
      sum+=40;
    }

  }
    cout<<sum/5<<endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
typedef pair<int,int> pii;
#define ITR(v,c) for(auto v=begin(c);v!=end(c);v++)
#define FOR(v,a,n) for(int v=a;v<(int)(n);v++)
#define FORE(x,arr) for(auto &x:arr)
#define REP(v,n) FOR(v,0,n)
#define RREP(v,n) for(int v=(int)(n);v>=0;v--)
#define ALL(c) begin(c),end(c)
const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0};
const int INF = 1e9;
const ll INFLL = 1e18;
template<class T,class U>ostream&operator<<(ostream &os,const pair<T,U> &p){
    os<<"("<<p.first<<","<<p.second<<")";return os;}
template<class T>ostream&operator<<(ostream &os,const vector<T> &v){
    ITR(i,v)os<<*i<<(i==end(v)-1?"":" ");return os;}
//------------------------------------------------------------------------------

signed main() {
    vector<int> s(5);
    FORE(x,s) cin>>x;
    cout<<accumulate(ALL(s),0)/5<<endl;
    return 0;
}

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

using namespace std;

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

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

int main(){
	int i,ave,tmp,sum = 0;

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

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

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

  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;

}

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

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

#define D(x) cout << #x " is " << (x) << endl
#define rep(i,n) for(int i = 0; i < n; i++)
#define all(c) (c).begin(),(c).end()
#define foreach(it, c) for(__typeof__((c).begin()) it=(c).begin();it!=(c).end();it++)

using namespace std;

int main(void){

  int a,ans=0;

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

  cout << ans/5 << endl;

  return 0;
}

C++: #include<iostream>
#define N 5
#define M 40

using namespace std;

int main(){
  int x, ans=0;
  for(int i=0; i<N; ++i){
    cin >> x;
    ans += (x>M ? x : M);
  }
  cout << ans/N << endl;
  return 0;
}

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

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