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

ans = float('inf')
for p in range(101):
    temp = 0
    for x in X:
        temp += (x-p)**2
    ans = min(ans, temp)
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 = float('inf') ans float('inf') float 'inf' for p in range(101):
    temp = 0
    for x in X:
        temp += (x-p)**2
    ans = min(ans, temp) p range(101) range 101 temp = 0 temp 0 for x in X:
        temp += (x-p)**2
     x X temp += (x-p)**2 temp (x-p)**2 x-p x p 2 ans = min(ans, temp) ans min(ans, temp) min ans temp print(ans) print ans n = int(input()) int(input()) n temp = 0 0 temp ans = float('inf') float('inf') ans temp += (x-p)**2 (x-p)**2 temp X = list(map(int, input().split())) list(map(int, input().split())) X ans = min(ans, temp) min(ans, temp) ans
n = int(input())
X = list(map(int, input().split()))

ans = float('inf')
for p in range(101):
    temp = 0
    for x in X:
        temp += (x-p)**2
    ans = min(ans, temp)
print(ans)
