n = int(input())
x = list(map(int, input().split()))

p = round(sum(x) / n)
print(sum([(x[i] - p)**2 for i in range(n)])) 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 p = round(sum(x) / n) p round(sum(x) / n) round sum(x) / n sum(x) sum x n (x[i] - p)**2 for i in range(n) for i in range(n) i range(n) range n for i in range(n) (x[i] - p)**2 x[i] - p x[i] x i p 2 print(sum([(x[i] - p)**2 for i in range(n)])) print sum([(x[i] - p)**2 for i in range(n)]) sum [(x[i] - p)**2 for i in range(n)] p = round(sum(x) / n) round(sum(x) / n) p 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()))

p = round(sum(x) / n)
print(sum([(x[i] - p)**2 for i in range(n)]))