N = int(input())
X = list(map(int, input().split()))
 
ans = 10000000000
for i in range(100):
  s = 0
  for j in range(N):
    s += (X[j]-i)**2
    
  ans = min(ans, s)
  
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 = 10000000000 ans 10000000000 for i in range(100):
  s = 0
  for j in range(N):
    s += (X[j]-i)**2
    
  ans = min(ans, s)
   i range(100) range 100 s = 0 s 0 for j in range(N):
    s += (X[j]-i)**2
    
   j range(N) range N s += (X[j]-i)**2 s (X[j]-i)**2 X[j]-i X[j] X j i 2 ans = min(ans, s) ans min(ans, s) min ans s print(ans) print ans s = 0 0 s N = int(input()) int(input()) N X = list(map(int, input().split())) list(map(int, input().split())) X ans = min(ans, s) min(ans, s) ans ans = 10000000000 10000000000 ans s += (X[j]-i)**2 (X[j]-i)**2 s
N = int(input())
X = list(map(int, input().split()))
 
ans = 10000000000
for i in range(100):
  s = 0
  for j in range(N):
    s += (X[j]-i)**2
    
  ans = min(ans, s)
  
print(ans)