n = int(input())

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

ans = 10**6

for i in range(1, 101):
    str = 0
    for j in x:
        str += (j-i)**2
    ans = min(ans, str)

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

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

ans = 10**6

for i in range(1, 101):
    str = 0
    for j in x:
        str += (j-i)**2
    ans = min(ans, str)

print(ans)