n = int(input())

ans = 10**7+9

x = list(map(int, input().split()))

X = len(x)

for i in range(100):
    total = 0
    for j in range(X):
        total += (x[j]-i)**2
    else:
        ans = min(ans,total)

print(ans) n = int(input()) n int(input()) int input() input ans = 10**7+9 ans 10**7+9 10**7 10 7 9 x = list(map(int, input().split())) x list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split X = len(x) X len(x) len x for i in range(100):
    total = 0
    for j in range(X):
        total += (x[j]-i)**2
    else:
        ans = min(ans,total) i range(100) range 100 total = 0 total 0 for j in range(X):
        total += (x[j]-i)**2
    else:
        ans = min(ans,total) j range(X) range X total += (x[j]-i)**2 total (x[j]-i)**2 x[j]-i x[j] x j i 2 ans = min(ans,total) ans min(ans,total) min ans total print(ans) print ans ans = 10**7+9 10**7+9 ans total = 0 0 total n = int(input()) int(input()) n ans = min(ans,total) min(ans,total) ans X = len(x) len(x) X x = list(map(int, input().split())) list(map(int, input().split())) x total += (x[j]-i)**2 (x[j]-i)**2 total
n = int(input())

ans = 10**7+9

x = list(map(int, input().split()))

X = len(x)

for i in range(100):
    total = 0
    for j in range(X):
        total += (x[j]-i)**2
    else:
        ans = min(ans,total)

print(ans)
