n = int(input())
x = list(map(int, input().split()))
hp_min = 10000 * n
for i in range(1, 101):
    hp = sum([(x[j] - i) ** 2 for j in range(len(x))])
    if hp < hp_min:
        hp_min = hp
print(hp_min) 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_min = 10000 * n hp_min 10000 * n 10000 n for i in range(1, 101):
    hp = sum([(x[j] - i) ** 2 for j in range(len(x))])
    if hp < hp_min:
        hp_min = hp i range(1, 101) range 1 101 (x[j] - i) ** 2 for j in range(len(x)) for j in range(len(x)) j range(len(x)) range len(x) len x for j in range(len(x)) (x[j] - i) ** 2 x[j] - i x[j] x j i 2 hp = sum([(x[j] - i) ** 2 for j in range(len(x))]) hp sum([(x[j] - i) ** 2 for j in range(len(x))]) sum [(x[j] - i) ** 2 for j in range(len(x))] if hp < hp_min:
        hp_min = hp hp < hp_min hp hp_min hp_min = hp hp_min hp print(hp_min) print hp_min x = list(map(int, input().split())) list(map(int, input().split())) x hp = sum([(x[j] - i) ** 2 for j in range(len(x))]) sum([(x[j] - i) ** 2 for j in range(len(x))]) hp hp_min = hp hp hp_min n = int(input()) int(input()) n hp_min = 10000 * n 10000 * n hp_min
n = int(input())
x = list(map(int, input().split()))
hp_min = 10000 * n
for i in range(1, 101):
    hp = sum([(x[j] - i) ** 2 for j in range(len(x))])
    if hp < hp_min:
        hp_min = hp
print(hp_min)
