Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)
	sum := 0
	for i := 0; i < 5; i++ {
		score := nextInt()
		if score < 40 {
			sum += 40
		} else {
			sum += score
		}
	}
	// fmt.Println(sum)
	fmt.Println(sum / 5)
}

Python: a=0
for i in range(5):
    b=int(input())
    if b<40:
        b=40
    a+=b
    
print(a//5)

Python: list=[int(input()) for j in range(5)]

sum=0
for i in range(5):
    if list[i]<40:
        list[i]=40
    sum+=list[i]
print(int(sum/5))

Python: lst=[]
for i in range(5):
    s=int(input())
    if s<40:
        s=40
    lst.append(s)

sm=sum(lst)
print(sm//5)

Python: lst=[]
for i in range (5):
    n=int(input())
    if n<40:
        n=40
    lst.append(n)


ave = sum(lst)/5
print(f'{ave:.2g}')

Python: s=0
for i in range(5) :
    p=int(input())
    if p<40:
        s+=40
    else:
        s+=p
print(s//5)

Python: j=0
a=list()
for j in range(5):
    b=int(input())
    if b<40:
        a.append(40)
    else:
        a.append(b)
    j+=1
print(sum(a)//5)

Python: sum=0
for i in range(5):
    s=int(input())
    if s>40:
        sum+=s
    else:
        sum+=40
print(int(sum/5))

Python: s=0
for i in range(5):
    n=int(input())
    if n<40:
        n=40
    else:
        pass
    s+=n
print(s//5)

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

Python: sum=0
for i in range(5):
    n=int(input())
    if n < 40:
        n = 40
    sum += n
    avg=sum//5
print(avg)

Python: a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

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
g=int(f/5)

print(g)

Python: a = []
for _ in range(5):
    x = int(input())
    a.append(x if x>= 40 else 40)
print(sum(a)//5)

Python: a=[]
for i in range(5):
    x=int(input())
    if x>=40:
        a.append(x)
    else:
        a.append(40)
print(sum(a)//len(a))

Python: print(int(sum([max(40, int(input())) for _ in range(5)]) / 5))

Python: L = []
for i in range(5):
    a = int(input())
    if a < 40 :
        a = 40
    L.append(a)
print(sum(L)//5)

Python: score=0
for i in range(5):
  a = int(input())
  if a<40:
    a=40
  score= a + score
print (score/5)

Python: k1=int(input())
k2=int(input())
k3=int(input())
k4=int(input())
k5=int(input())
k=0
for i in (k1,k2,k3,k4,k5):
    if i<40:
        k+=40
    else:
        k+=i
print(k//5)

Python: try:
   sum = 0
   for i in range(5):
      s = int(input())
      if s >= 40:
         sum += s
      else:
         sum += 40
   print(int(sum / 5))

except EOFError:
   pas

Python: i = [int(input()) for i in range(5)]
for j in range(5):
    if i[j] < 40:
        i[j] = 40
print(sum(i) // 5)

Python: tensu=[]

for i in range(5):
    a=int(input())
    if a < 40:a=40
    tensu.append(a) #要素の追加
print((sum(tensu))//5)

Python: a = 0
for i in range(5):
  b = int(input())
  if b < 40:
    b = 40
  a += b
print(a//5)

Python: a=0
for i in range(5):
    b=int(input())
    if b<40:b=40
    a+=b
print(a//5)

Python: data = []
kekka = []
for i in range(5):
    n = int(input())
    data.append(n)
for i in range(5):
    if data[i]<40:
        kekka.append(40)
    else:
        kekka.append(data[i])
print(int(sum(kekka)/5))

Python: a = []
t = 0
i = 1
while i <= 5:
    b = int(input())
    a.append(b)
    i += 1
for j in range(5): 
    if a[j] < 40:
        a[j] = 40
    t += a[j]
print(t//5)

Python: a = []

for i in range(5):
    n = int(input())
    if n >= 40:
        a.append(n)
    else:
        a.append(40)
        
s = sum(a)
t = s/5
print("{:.0f}".format(t))

Python: a=[]
i=0
while i<5:
    b=int(input())
    if b<40:
        b=40
    
    a.insert(i,b)
    i+=1

print(int(sum(a)/len(a)))

Python: x=[]
for i in range(5):
    s=int(input())
    if s<40:
        s=40
    x.append(int(s))
t=sum(x)
u=t/5
print(int(u))

Python: sum = 0
for i in range(5):
 a = int(input())
 if a <= 40: a = 40
 sum += a
print(sum//5)

Python: sum = 0
for i in range(5) :
    score = int(input())
    if score < 40 :
        score = 40
    sum += score
print(sum//5)

Python: # AOJ 0592: Average Score
# Python3 2018.6.30 bal4u

s = 0
for i in range(5):
	a = int(input())
	if a < 40: a = 40
	s += a
print(s//5)

Python: s = 0
for i in range(5):
	a = int(input())
	if a < 40: a = 40
	s += a
print(s//5)

Python: x = []
for i in range(5):
    X = int(input())
    if X < 40:
        X = 40
    x.append(X)
    
print((sum(x))//5)

Python: sum=0
ave=0
for i in range(5):
    a=int(input())
    if a<40:
        a=40
    sum+=a
ave=sum//5
print(ave)

Python: sum = 0
ave = 0
for i in range(5):
    a = int(input())
    if a < 40:
        a = 40
    sum += a
ave = sum / 5
print(int(ave))

Python: s=0
y=[]
for i in range(1,6):
    x=int(input())
    if x>=40:
        y.append(x)
    else:
        y.append(40)
        
for i in range(0,5):
    s+=y[i]

print(int(s/5))

Python: sum=0
for i in range(5):
    a=int(input())
    if a<40:
        a=40
    sum+=a
print(sum//5)

Python: A = []
for i in range(5):
    a = int(input())
    if a < 40:
        a = 40
    A.append(a)
print(int(sum(A)/5))

Python: tensuu = []
for i in range(5):
    a = int(input())
    if a < 40:
        a = 40
    tensuu.append(a)
print((sum(tensuu))//5)

Python: sum = 0
for i in range(5) :
    score = int(input())
    if score < 40 :
        score = 40
    sum += score
print(sum//5)

Python: # coding: utf-8
# 43

A = [int(input()) for i in range(5)]
#print(A)

for i in range(5):
    if A[i]<40:
        A[i] = 40
    else:
        pass
print(sum(A)//len(A))

Python: sum = 0
for i in range(5):
    n = int(input())
    if n < 40:
        n = 40
    else:
        pass
    sum += n
print(sum//5)

Python: scores = [int(input()) for _ in range(5)]
print(sum([(score < 40) * 40 + (score >= 40) * score for score in scores]) // 5)

Python: if __name__ == '__main__':
    # ??????????????\???
    scores = [int(input()) for _ in range(5)]

    # ??????????????????
    final_scores = [max(s, 40) for s in scores]

    # ???????????????
    print('{0}'.format(sum(final_scores)//len(final_scores)))

Python: # coding: utf-8

from statistics import mean

scores = [int(input()) for i in range(5)]
scores = list(map(lambda x: max(40, x), scores))
print(mean(scores))

Python: a=0
for i in range(5):
    b=int(input())
    if b<40:b=40
    a+=b
print(a//5)

Python: 
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

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
print((a+b+c+d+e)//5)

Python: # coding: utf-8
# Your code here!

s = 0
for i in range(5):
    a = int(input())
    if a < 40:
        a = 40
    s += a
print(s//5)

Python: a=[]
for i in range(5):
    n=int(input())
    a.append(n)
for _ in range(5):
    if a[_]<40:
        a[_]=40
sum=0
for l in range(5):
    b=a[l]
    sum+=b
av=sum//5
print(av)

Python: print(sum(max(40, int(input())) for i in range(5)) // 5)

Python: print(sum([max(int(input()),40) for _ in range(5)]) // 5)

Python: a=[]
sum=0
for i in range(5):
    n=int(input())
    if n>=40:
        a.append(n)
    else:
        a.append(40)
    sum +=a[i]

print(sum//5)

Python: #(43)平均点
a=[]
for i in range(5):
    n=int(input())
    a.append(n)
    
for _ in range(5):
    if a[_]<40:
        a[_]=40

sum=0
for l in range(5):
    b=a[l]
    sum+=b

av=sum//5
print(av)

Python: #A問題
S = 0
for i in range(5):
    s = int(input())
    s = max(s,40)
    S+=s
    
print(S//5)

Python: a=[]
for i in range(5):
    a.append(max(40,int(input())))
print(int(sum(a)/len(a)))