n, x = int(input()), list(map(int, input().split()))
px = 0
a = 100 ** 100
for i in range(100):
  s = 0
  for j in x:
    s += (i-j) ** 2
  if a > s:
    a = s
print(a) n, x = int(input()), list(map(int, input().split())) n int(input()) int input() input x list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split px = 0 px 0 a = 100 ** 100 a 100 ** 100 100 100 for i in range(100):
  s = 0
  for j in x:
    s += (i-j) ** 2
  if a > s:
    a = s i range(100) range 100 s = 0 s 0 for j in x:
    s += (i-j) ** 2
   j x s += (i-j) ** 2 s (i-j) ** 2 i-j i j 2 if a > s:
    a = s a > s a s a = s a s print(a) print a s = 0 0 s x = int(input()), list(map(int, input().split())) list(map(int, input().split())) x s += (i-j) ** 2 (i-j) ** 2 s px = 0 0 px a = s s a n, x = int(input()), list(map(int, input().split())) int(input()) n a = 100 ** 100 100 ** 100 a
n, x = int(input()), list(map(int, input().split()))
px = 0
a = 100 ** 100
for i in range(100):
  s = 0
  for j in x:
    s += (i-j) ** 2
  if a > s:
    a = s
print(a)