Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	return n
}

func main() {
	sc.Split(bufio.ScanWords)

	sum := 0
	for i := 0; i < 5; i++ {
		x := nextInt()
		if x < 40 {
			sum += 40
		} else {
			sum += x
		}
	}
	fmt.Println(sum / 5)
}

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

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