n = int(input())
a = [int(x) for x in input().split()]
print(sum([(x - round(sum(a) / n))**2 for x in a])) n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a = [int(x) for x in input().split()] a [int(x) for x in input().split()] (x - round(sum(a) / n))**2 for x in a for x in a x a for x in a (x - round(sum(a) / n))**2 x - round(sum(a) / n) x round(sum(a) / n) round sum(a) / n sum(a) sum a n 2 print(sum([(x - round(sum(a) / n))**2 for x in a])) print sum([(x - round(sum(a) / n))**2 for x in a]) sum [(x - round(sum(a) / n))**2 for x in a] n = int(input()) int(input()) n a = [int(x) for x in input().split()] [int(x) for x in input().split()] a
n = int(input())
a = [int(x) for x in input().split()]
print(sum([(x - round(sum(a) / n))**2 for x in a]))