n, *x = map(int, open(0).read().split())
print(min([sum([(a - i) ** 2 for a in x]) for i in range(1, 101)])) n, *x = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split *x x sum([(a - i) ** 2 for a in x]) for i in range(1, 101) for i in range(1, 101) i range(1, 101) range 1 101 for i in range(1, 101) sum([(a - i) ** 2 for a in x]) sum [(a - i) ** 2 for a in x] print(min([sum([(a - i) ** 2 for a in x]) for i in range(1, 101)])) print min([sum([(a - i) ** 2 for a in x]) for i in range(1, 101)]) min [sum([(a - i) ** 2 for a in x]) for i in range(1, 101)] n, *x = map(int, open(0).read().split()) map(int, open(0).read().split()) n
n, *x = map(int, open(0).read().split())
print(min([sum([(a - i) ** 2 for a in x]) for i in range(1, 101)]))