N = int(input())
cc = list(map(int,input().split()))
min_sum = float('inf')
for i in range(1,101):
  count = 0
  for j in cc:
    count += (i-j)**2
  min_sum = min(min_sum,count)
print(min_sum) N = int(input()) N int(input()) int input() input cc = list(map(int,input().split())) cc list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split min_sum = float('inf') min_sum float('inf') float 'inf' for i in range(1,101):
  count = 0
  for j in cc:
    count += (i-j)**2
  min_sum = min(min_sum,count) i range(1,101) range 1 101 count = 0 count 0 for j in cc:
    count += (i-j)**2
   j cc count += (i-j)**2 count (i-j)**2 i-j i j 2 min_sum = min(min_sum,count) min_sum min(min_sum,count) min min_sum count print(min_sum) print min_sum min_sum = float('inf') float('inf') min_sum count += (i-j)**2 (i-j)**2 count count = 0 0 count cc = list(map(int,input().split())) list(map(int,input().split())) cc N = int(input()) int(input()) N min_sum = min(min_sum,count) min(min_sum,count) min_sum
N = int(input())
cc = list(map(int,input().split()))
min_sum = float('inf')
for i in range(1,101):
  count = 0
  for j in cc:
    count += (i-j)**2
  min_sum = min(min_sum,count)
print(min_sum)