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

power_min = 1e8
for P in range(1,101):
    power = 0
    for i in range(N):
        power += (X[i]-P)**2
    if power < power_min:
        power_min = power

print(power_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 power_min = 1e8 power_min 1e8 for P in range(1,101):
    power = 0
    for i in range(N):
        power += (X[i]-P)**2
    if power < power_min:
        power_min = power P range(1,101) range 1 101 power = 0 power 0 for i in range(N):
        power += (X[i]-P)**2
     i range(N) range N power += (X[i]-P)**2 power (X[i]-P)**2 X[i]-P X[i] X i P 2 if power < power_min:
        power_min = power power < power_min power power_min power_min = power power_min power print(power_min) print power_min X=list(map(int, input().split())) list(map(int, input().split())) X power_min = 1e8 1e8 power_min N=int(input()) int(input()) N power_min = power power power_min power += (X[i]-P)**2 (X[i]-P)**2 power power = 0 0 power
N=int(input())
X=list(map(int, input().split()))

power_min = 1e8
for P in range(1,101):
    power = 0
    for i in range(N):
        power += (X[i]-P)**2
    if power < power_min:
        power_min = power

print(power_min)