N = map(int,input())
X=[]
for i in range(1,N+1):
    X.append(list(map(int,input().split())))
    
re=0
for i in range(N-1):
    for x in range(1,N+1):
        for y in range(1,N+1):
            new = (X[x]+X[y])/2
            re += new
print(re)