N = int(input())
X = list(map(int,input().split()))
cmin = 10**6+10
for i in range(101):
    cnt = 0
    for j in range(N):
        cnt += (i-X[j])**2
    cmin = min(cmin,cnt)
print(cmin) 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 cmin = 10**6+10 cmin 10**6+10 10**6 10 6 10 for i in range(101):
    cnt = 0
    for j in range(N):
        cnt += (i-X[j])**2
    cmin = min(cmin,cnt) i range(101) range 101 cnt = 0 cnt 0 for j in range(N):
        cnt += (i-X[j])**2
     j range(N) range N cnt += (i-X[j])**2 cnt (i-X[j])**2 i-X[j] i X[j] X j 2 cmin = min(cmin,cnt) cmin min(cmin,cnt) min cmin cnt print(cmin) print cmin cnt = 0 0 cnt N = int(input()) int(input()) N cmin = 10**6+10 10**6+10 cmin cnt += (i-X[j])**2 (i-X[j])**2 cnt X = list(map(int,input().split())) list(map(int,input().split())) X cmin = min(cmin,cnt) min(cmin,cnt) cmin
N = int(input())
X = list(map(int,input().split()))
cmin = 10**6+10
for i in range(101):
    cnt = 0
    for j in range(N):
        cnt += (i-X[j])**2
    cmin = min(cmin,cnt)
print(cmin)