n=int(input())
x=[int(i)for i in input().split()]
p=[sum([(j-i)**2 for j in x]) for i in range(101)]
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()] sum([(j-i)**2 for j in x]) for i in range(101) for i in range(101) i range(101) range 101 for i in range(101) sum([(j-i)**2 for j in x]) sum [(j-i)**2 for j in x] p=[sum([(j-i)**2 for j in x]) for i in range(101)] p [sum([(j-i)**2 for j in x]) for i in range(101)] print(min(p)) print min(p) min p p=[sum([(j-i)**2 for j in x]) for i in range(101)] [sum([(j-i)**2 for j in x]) for i in range(101)] p n=int(input()) int(input()) n 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=[sum([(j-i)**2 for j in x]) for i in range(101)]
print(min(p))