n=int(input())
x=list(map(int,input().split()))
c=[]
for i in range(101):
    b=0
    for j in x:
        b+=((j-i)**2)
    c.append(b)
print(min(c)) 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 c=[] c [] for i in range(101):
    b=0
    for j in x:
        b+=((j-i)**2)
    c.append(b) i range(101) range 101 b=0 b 0 for j in x:
        b+=((j-i)**2)
     j x b+=((j-i)**2) b (j-i)**2 j-i j i 2 c.append(b) c.append c append b print(min(c)) print min(c) min c n=int(input()) int(input()) n b+=((j-i)**2) (j-i)**2 b c=[] [] c x=list(map(int,input().split())) list(map(int,input().split())) x b=0 0 b
n=int(input())
x=list(map(int,input().split()))
c=[]
for i in range(101):
    b=0
    for j in x:
        b+=((j-i)**2)
    c.append(b)
print(min(c))