a = int(input())
n = list(map(int, input().split()))
m = round(sum(n) / len(n))
print(sum((i-m) ** 2 for i in n)) a = int(input()) a int(input()) int input() input n = list(map(int, input().split())) n list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split m = round(sum(n) / len(n)) m round(sum(n) / len(n)) round sum(n) / len(n) sum(n) sum n len(n) len n print(sum((i-m) ** 2 for i in n)) print sum((i-m) ** 2 for i in n) sum (i-m) ** 2 i-m i m 2 n = list(map(int, input().split())) list(map(int, input().split())) n m = round(sum(n) / len(n)) round(sum(n) / len(n)) m a = int(input()) int(input()) a
a = int(input())
n = list(map(int, input().split()))
m = round(sum(n) / len(n))
print(sum((i-m) ** 2 for i in n))
