N = int(input())
X = list(map(int,input().split()))
A = []

for p in range(1,101):
  A+=[sum((x-p)**2 for x in X)]

print(min(A)) 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 = [] A [] for p in range(1,101):
  A+=[sum((x-p)**2 for x in X)] p range(1,101) range 1 101 A+=[sum((x-p)**2 for x in X)] A [sum((x-p)**2 for x in X)] sum((x-p)**2 for x in X) sum (x-p)**2 x-p x p 2 print(min(A)) print min(A) min A X = list(map(int,input().split())) list(map(int,input().split())) X N = int(input()) int(input()) N A = [] [] A A+=[sum((x-p)**2 for x in X)] [sum((x-p)**2 for x in X)] A
N = int(input())
X = list(map(int,input().split()))
A = []

for p in range(1,101):
  A+=[sum((x-p)**2 for x in X)]

print(min(A))