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

for p in range(1, 101):
	now = 0
	for x in X:
		now += (p - x) ** 2
	ans = min(ans, now)
print(ans) 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 ans = 100 ** 100 ans 100 ** 100 100 100 for p in range(1, 101):
	now = 0
	for x in X:
		now += (p - x) ** 2
	ans = min(ans, now) p range(1, 101) range 1 101 now = 0 now 0 for x in X:
		now += (p - x) ** 2
	 x X now += (p - x) ** 2 now (p - x) ** 2 p - x p x 2 ans = min(ans, now) ans min(ans, now) min ans now print(ans) print ans X = list(map(int, input().split())) list(map(int, input().split())) X now = 0 0 now N = int(input()) int(input()) N ans = 100 ** 100 100 ** 100 ans now += (p - x) ** 2 (p - x) ** 2 now ans = min(ans, now) min(ans, now) ans
N = int(input())
X = list(map(int, input().split()))
ans = 100 ** 100

for p in range(1, 101):
	now = 0
	for x in X:
		now += (p - x) ** 2
	ans = min(ans, now)
print(ans)
