n = int(input())
x = list(map(int, input().split()))
ret = 1000000
for p in range(1, 101):
    ret = min(ret, sum((x - p) ** 2 for x in x))
print(ret) 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 ret = 1000000 ret 1000000 for p in range(1, 101):
    ret = min(ret, sum((x - p) ** 2 for x in x)) p range(1, 101) range 1 101 ret = min(ret, sum((x - p) ** 2 for x in x)) ret min(ret, sum((x - p) ** 2 for x in x)) min ret sum((x - p) ** 2 for x in x) sum (x - p) ** 2 x - p x p 2 print(ret) print ret ret = min(ret, sum((x - p) ** 2 for x in x)) min(ret, sum((x - p) ** 2 for x in x)) ret x = list(map(int, input().split())) list(map(int, input().split())) x ret = 1000000 1000000 ret n = int(input()) int(input()) n
n = int(input())
x = list(map(int, input().split()))
ret = 1000000
for p in range(1, 101):
    ret = min(ret, sum((x - p) ** 2 for x in x))
print(ret)
