N = int(input())
X = list(map(int, input().split()))
S = [0]*100
for i in range(1,101):
  sum = 0
  for j in range(N):
    sum += (X[j]-i)**2
  S[i-1] = sum
print(min(S)) 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 S = [0]*100 S [0]*100 [0] 0 100 for i in range(1,101):
  sum = 0
  for j in range(N):
    sum += (X[j]-i)**2
  S[i-1] = sum i range(1,101) range 1 101 sum = 0 sum 0 for j in range(N):
    sum += (X[j]-i)**2
   j range(N) range N sum += (X[j]-i)**2 sum (X[j]-i)**2 X[j]-i X[j] X j i 2 S[i-1] = sum S[i-1] S i-1 i 1 sum print(min(S)) print min(S) min S X = list(map(int, input().split())) list(map(int, input().split())) X N = int(input()) int(input()) N S = [0]*100 [0]*100 S sum = 0 0 sum sum += (X[j]-i)**2 (X[j]-i)**2 sum
N = int(input())
X = list(map(int, input().split()))
S = [0]*100
for i in range(1,101):
  sum = 0
  for j in range(N):
    sum += (X[j]-i)**2
  S[i-1] = sum
print(min(S))
