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

lc=[]
for i in range(1,101):
    c = 0
    for x in lx:
        c += (i-x)**2
    lc.append(c)

print(min(lc)) n = int(input()) n int(input()) int input() input lx = list(map(int,input().split())) lx list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split lc=[] lc [] for i in range(1,101):
    c = 0
    for x in lx:
        c += (i-x)**2
    lc.append(c) i range(1,101) range 1 101 c = 0 c 0 for x in lx:
        c += (i-x)**2
     x lx c += (i-x)**2 c (i-x)**2 i-x i x 2 lc.append(c) lc.append lc append c print(min(lc)) print min(lc) min lc n = int(input()) int(input()) n c = 0 0 c lc=[] [] lc c += (i-x)**2 (i-x)**2 c lx = list(map(int,input().split())) list(map(int,input().split())) lx
n = int(input())
lx = list(map(int,input().split()))

lc=[]
for i in range(1,101):
    c = 0
    for x in lx:
        c += (i-x)**2
    lc.append(c)

print(min(lc))
