N = int(input())
X = list(map(int, input().split()))

costs = [0] * 100
for x in X:
    for i in range(100):
        costs[i] += (x - (i + 1)) * (x - (i + 1))
print(min(costs)) 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 costs = [0] * 100 costs [0] * 100 [0] 0 100 for x in X:
    for i in range(100):
        costs[i] += (x - (i + 1)) * (x - (i + 1)) x X for i in range(100):
        costs[i] += (x - (i + 1)) * (x - (i + 1)) i range(100) range 100 costs[i] += (x - (i + 1)) * (x - (i + 1)) costs[i] costs i (x - (i + 1)) * (x - (i + 1)) x - (i + 1) x i + 1 i 1 x - (i + 1) x i + 1 i 1 print(min(costs)) print min(costs) min costs N = int(input()) int(input()) N X = list(map(int, input().split())) list(map(int, input().split())) X costs = [0] * 100 [0] * 100 costs
N = int(input())
X = list(map(int, input().split()))

costs = [0] * 100
for x in X:
    for i in range(100):
        costs[i] += (x - (i + 1)) * (x - (i + 1))
print(min(costs))
