origin_num = [int(x) for x in input().split()]
result_num = ['N','N','N','N','N']
mod1_num = []
sum1,sum2,sum3,count2,count3,max = 0,0,0,0,0,0
for i in range(1,len(origin_num)):
if origin_num[i] % 5 == 0 and origin_num[i] % 2 == 0:
sum1 += origin_num[i]
result_num[0] = sum1
elif origin_num[i] % 5 == 1:
mod1_num.append(origin_num[i])
elif origin_num[i] % 5 == 2:
count2 += 1
result_num[2] = count2
elif origin_num[i] % 5 == 3:
sum3 += origin_num[i]
count3 += 1
result_num[3] = round((sum3/count3),1)
elif origin_num[i] % 5 == 4:
if max < origin_num[i]:
max = origin_num[i]
result_num[4] = max
if len(mod1_num) % 2 == 1:
mod1_num.append(0)
for i in range(0,len(mod1_num)-1,2):
sum2 += (mod1_num[i] - mod1_num[i+1])
result_num[1] = sum2
for i in range(0,5):
if i == 4:
print(result_num[i],end='')
else:
print(result_num[i],end=' ')
输入数据的第一个数为输入的个数。