n=int(input())
man=list(map(int,input().split()))
can=[]
for i in range(1,101):
	pp=0
	for j in range(len(man)):
		bp=(man[j]-i)**2
		pp+=bp
	can.append(pp)
can.sort(key=int)
print(can[0]) n=int(input()) n int(input()) int input() input man=list(map(int,input().split())) man list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split can=[] can [] for i in range(1,101):
	pp=0
	for j in range(len(man)):
		bp=(man[j]-i)**2
		pp+=bp
	can.append(pp) i range(1,101) range 1 101 pp=0 pp 0 for j in range(len(man)):
		bp=(man[j]-i)**2
		pp+=bp
	 j range(len(man)) range len(man) len man bp=(man[j]-i)**2 bp (man[j]-i)**2 man[j]-i man[j] man j i 2 pp+=bp pp bp can.append(pp) can.append can append pp can.sort(key=int) can.sort can sort key=int key int print(can[0]) print can[0] can 0 man=list(map(int,input().split())) list(map(int,input().split())) man n=int(input()) int(input()) n pp=0 0 pp bp=(man[j]-i)**2 (man[j]-i)**2 bp can=[] [] can pp+=bp bp pp
n=int(input())
man=list(map(int,input().split()))
can=[]
for i in range(1,101):
	pp=0
	for j in range(len(man)):
		bp=(man[j]-i)**2
		pp+=bp
	can.append(pp)
can.sort(key=int)
print(can[0])
