n = int(input())    
xl = list(map(int, input().split()))   
ans = 10**10 
for i in range(1,101):
    v = 0
    for x in xl:
        v += (x-i)**2
    ans = min(ans,v)

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

print(ans)