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

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

ans = 10**10
for i in range(101):
    t = 0
    for x in X:
        t += (x-i)**2
    ans = min(ans, t)
print(ans)