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

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

print(ans)
