number=int(input())
list=[float(n) for n in input().split()]
sum=0
count_1=number
count_2=1
length=len(list)
for i in range(length):
sum+=list[i]*count_1*count_2
count_1-=1
count_2+=1
print("{:.2f}".format(sum))
如果模拟出每个子列太过于复杂,转而变为每个元素被加的次数