N = int(input())
X = list(map(int, input().split()))
ans = 1<<60
for center in range(101):
    a = 0
    for x in X:
        a += (x - center) ** 2
    if a < ans:
        ans = a
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 = 1<<60 ans 1<<60 1 60 for center in range(101):
    a = 0
    for x in X:
        a += (x - center) ** 2
    if a < ans:
        ans = a center range(101) range 101 a = 0 a 0 for x in X:
        a += (x - center) ** 2
     x X a += (x - center) ** 2 a (x - center) ** 2 x - center x center 2 if a < ans:
        ans = a a < ans a ans ans = a ans a print(ans) print ans a += (x - center) ** 2 (x - center) ** 2 a N = int(input()) int(input()) N ans = 1<<60 1<<60 ans a = 0 0 a X = list(map(int, input().split())) list(map(int, input().split())) X ans = a a ans
N = int(input())
X = list(map(int, input().split()))
ans = 1<<60
for center in range(101):
    a = 0
    for x in X:
        a += (x - center) ** 2
    if a < ans:
        ans = a
print(ans)
