N = int(input())
X = list(map(int, input().split()))
a = sum(X)
b = sum([x * x for x in X])
if a / N - a // N < 0.5:
  c = a // N
else:
  c = a // N + 1
print(N * c * c - 2 * a * c + b) 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 a = sum(X) a sum(X) sum X x * x for x in X for x in X x X for x in X x * x x x b = sum([x * x for x in X]) b sum([x * x for x in X]) sum [x * x for x in X] if a / N - a // N < 0.5:
  c = a // N
else:
  c = a // N + 1 a / N - a // N < 0.5 a / N - a // N a / N a N a // N a N 0.5 c = a // N c a // N a N c = a // N + 1 c a // N + 1 a // N a N 1 print(N * c * c - 2 * a * c + b) print N * c * c - 2 * a * c + b N * c * c - 2 * a * c N * c * c N * c N c c 2 * a * c 2 * a 2 a c b a = sum(X) sum(X) a c = a // N + 1 a // N + 1 c N = int(input()) int(input()) N c = a // N a // N c X = list(map(int, input().split())) list(map(int, input().split())) X b = sum([x * x for x in X]) sum([x * x for x in X]) b
N = int(input())
X = list(map(int, input().split()))
a = sum(X)
b = sum([x * x for x in X])
if a / N - a // N < 0.5:
  c = a // N
else:
  c = a // N + 1
print(N * c * c - 2 * a * c + b)