n = int(input())
x = list(map(int,input().split()))

m = sum(x)/len(x)
m = int(round(m))
power = sum([(i - m)**2 for i in x])
print(power) 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 m = sum(x)/len(x) m sum(x)/len(x) sum(x) sum x len(x) len x m = int(round(m)) m int(round(m)) int round(m) round m (i - m)**2 for i in x for i in x i x for i in x (i - m)**2 i - m i m 2 power = sum([(i - m)**2 for i in x]) power sum([(i - m)**2 for i in x]) sum [(i - m)**2 for i in x] print(power) print power x = list(map(int,input().split())) list(map(int,input().split())) x power = sum([(i - m)**2 for i in x]) sum([(i - m)**2 for i in x]) power m = sum(x)/len(x) sum(x)/len(x) m n = int(input()) int(input()) n m = int(round(m)) int(round(m)) m
n = int(input())
x = list(map(int,input().split()))

m = sum(x)/len(x)
m = int(round(m))
power = sum([(i - m)**2 for i in x])
print(power)