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