N = int(input()) a = list(map(float, input().split())) s = 0 t = 0 for x in a: s += x t += x*x ans = (s*s-t)/s+1 print(ans)