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

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

ans = 10**18
for i in range(1,101):
  t = 0
  for j in range(n):
    t += (x[j]-i)**2
  ans = min(ans,t)
print(ans)