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