n = int(input())
x = list(map(int, input().split()))
y = round(sum(x)/n)

print(sum([abs(i-y)**2 for i in x])) 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 y = round(sum(x)/n) y round(sum(x)/n) round sum(x)/n sum(x) sum x n abs(i-y)**2 for i in x for i in x i x for i in x abs(i-y)**2 abs(i-y) abs i-y i y 2 print(sum([abs(i-y)**2 for i in x])) print sum([abs(i-y)**2 for i in x]) sum [abs(i-y)**2 for i in x] y = round(sum(x)/n) round(sum(x)/n) y n = int(input()) int(input()) n x = list(map(int, input().split())) list(map(int, input().split())) x
n = int(input())
x = list(map(int, input().split()))
y = round(sum(x)/n)

print(sum([abs(i-y)**2 for i in x]))