n = int(input())
x = list(map(int, input().split()))
ans = 1000000
for i in range(1, 101):
    s = 0
    for j in range(n):
        s += (x[j] - i)*(x[j] - i)
    ans = min(ans, s)

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

print(str(ans))
