n=int(input())
x=[int(i)for i in input().split()]
p=[0 for i in range(101)]
for i in range(101):
    p[i]=sum([(j-i)**2 for j in x])
print(min(p)) n=int(input()) n int(input()) int input() input int(i)for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i x=[int(i)for i in input().split()] x [int(i)for i in input().split()] 0 for i in range(101) for i in range(101) i range(101) range 101 for i in range(101) 0 p=[0 for i in range(101)] p [0 for i in range(101)] for i in range(101):
    p[i]=sum([(j-i)**2 for j in x]) i range(101) range 101 (j-i)**2 for j in x for j in x j x for j in x (j-i)**2 j-i j i 2 p[i]=sum([(j-i)**2 for j in x]) p[i] p i sum([(j-i)**2 for j in x]) sum [(j-i)**2 for j in x] print(min(p)) print min(p) min p n=int(input()) int(input()) n p=[0 for i in range(101)] [0 for i in range(101)] p x=[int(i)for i in input().split()] [int(i)for i in input().split()] x
n=int(input())
x=[int(i)for i in input().split()]
p=[0 for i in range(101)]
for i in range(101):
    p[i]=sum([(j-i)**2 for j in x])
print(min(p))