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