N=int(input())
X=list(map(int,input().split()))
a=round(sum(X)/N)
Y=[]
for i in X:
    Y.append((i-a)**2)
print(sum(Y)) N=int(input()) N int(input()) int input() input X=list(map(int,input().split())) X list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a=round(sum(X)/N) a round(sum(X)/N) round sum(X)/N sum(X) sum X N Y=[] Y [] for i in X:
    Y.append((i-a)**2) i X Y.append((i-a)**2) Y.append Y append (i-a)**2 i-a i a 2 print(sum(Y)) print sum(Y) sum Y Y=[] [] Y X=list(map(int,input().split())) list(map(int,input().split())) X N=int(input()) int(input()) N a=round(sum(X)/N) round(sum(X)/N) a
N=int(input())
X=list(map(int,input().split()))
a=round(sum(X)/N)
Y=[]
for i in X:
    Y.append((i-a)**2)
print(sum(Y))