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

ans = 10 ** 19
for i in range(101):
  ans = min(ans, sum((x - i) ** 2 for x in X))
  
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 ** 19 ans 10 ** 19 10 19 for i in range(101):
  ans = min(ans, sum((x - i) ** 2 for x in X))
   i range(101) range 101 ans = min(ans, sum((x - i) ** 2 for x in X)) ans min(ans, sum((x - i) ** 2 for x in X)) min ans sum((x - i) ** 2 for x in X) sum (x - i) ** 2 x - i x i 2 print(ans) print ans ans = 10 ** 19 10 ** 19 ans n = int(input()) int(input()) n X = list(map(int, input().split())) list(map(int, input().split())) X ans = min(ans, sum((x - i) ** 2 for x in X)) min(ans, sum((x - i) ** 2 for x in X)) ans
n = int(input())
X = list(map(int, input().split()))

ans = 10 ** 19
for i in range(101):
  ans = min(ans, sum((x - i) ** 2 for x in X))
  
print(ans)