a = int(input())
b = input().split()
b = [int(j) for j in b]
x = round(sum(b) / a)
y = []
for i in range(a):
    y.append((x - b[i])**2)
print(sum(y)) a = int(input()) a int(input()) int input() input b = input().split() b input().split() ().split () input split int(j) for j in b for j in b j b for j in b int(j) int j b = [int(j) for j in b] b [int(j) for j in b] x = round(sum(b) / a) x round(sum(b) / a) round sum(b) / a sum(b) sum b a y = [] y [] for i in range(a):
    y.append((x - b[i])**2) i range(a) range a y.append((x - b[i])**2) y.append y append (x - b[i])**2 x - b[i] x b[i] b i 2 print(sum(y)) print sum(y) sum y b = input().split() input().split() b a = int(input()) int(input()) a b = [int(j) for j in b] [int(j) for j in b] b y = [] [] y x = round(sum(b) / a) round(sum(b) / a) x
a = int(input())
b = input().split()
b = [int(j) for j in b]
x = round(sum(b) / a)
y = []
for i in range(a):
    y.append((x - b[i])**2)
print(sum(y))