n = int(input())
x = [int(x) for x in input().split()]
res = 10 ** 10
for i in range(101):
  c = 0
  for j in range(n):
    c += (i - x[j]) ** 2
  res = min(res,c)
print(res) n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x x = [int(x) for x in input().split()] x [int(x) for x in input().split()] res = 10 ** 10 res 10 ** 10 10 10 for i in range(101):
  c = 0
  for j in range(n):
    c += (i - x[j]) ** 2
  res = min(res,c) i range(101) range 101 c = 0 c 0 for j in range(n):
    c += (i - x[j]) ** 2
   j range(n) range n c += (i - x[j]) ** 2 c (i - x[j]) ** 2 i - x[j] i x[j] x j 2 res = min(res,c) res min(res,c) min res c print(res) print res c += (i - x[j]) ** 2 (i - x[j]) ** 2 c n = int(input()) int(input()) n x = [int(x) for x in input().split()] [int(x) for x in input().split()] x c = 0 0 c res = min(res,c) min(res,c) res res = 10 ** 10 10 ** 10 res
n = int(input())
x = [int(x) for x in input().split()]
res = 10 ** 10
for i in range(101):
  c = 0
  for j in range(n):
    c += (i - x[j]) ** 2
  res = min(res,c)
print(res)