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