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

HP = []
for p in range(1, 101, 1):
    P = [p] * len(X)
    delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)])
    HP.append(delta)

print(min(HP)) 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 HP = [] HP [] for p in range(1, 101, 1):
    P = [p] * len(X)
    delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)])
    HP.append(delta) p range(1, 101, 1) range 1 101 1 P = [p] * len(X) P [p] * len(X) [p] p len(X) len X (i - j) ** 2 for (i, j) in zip(X, P) for (i, j) in zip(X, P) (i, j) i j zip(X, P) zip X P for (i, j) in zip(X, P) (i - j) ** 2 i - j i j 2 delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)]) delta sum([(i - j) ** 2 for (i, j) in zip(X, P)]) sum [(i - j) ** 2 for (i, j) in zip(X, P)] HP.append(delta) HP.append HP append delta print(min(HP)) print min(HP) min HP X = list(map(int, input().split())) list(map(int, input().split())) X N = int(input()) int(input()) N HP = [] [] HP delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)]) sum([(i - j) ** 2 for (i, j) in zip(X, P)]) delta P = [p] * len(X) [p] * len(X) P
N = int(input())
X = list(map(int, input().split()))

HP = []
for p in range(1, 101, 1):
    P = [p] * len(X)
    delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)])
    HP.append(delta)

print(min(HP))
