while 1:
try:
max = 0
min = 100
sum = 0
n = map(float, input().split())
for i in n:
sum += i
if i > max:
max = i
if i < min:
min = i
a = (sum-max-min)/5
print("%.2f" % a)
except:
break