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

ans = float('inf')
for i in range(1, 101):
    h = 0
    for j in x:
        h += (i-j)**2
    ans = min(ans, h)
print(ans) 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 ans = float('inf') ans float('inf') float 'inf' for i in range(1, 101):
    h = 0
    for j in x:
        h += (i-j)**2
    ans = min(ans, h) i range(1, 101) range 1 101 h = 0 h 0 for j in x:
        h += (i-j)**2
     j x h += (i-j)**2 h (i-j)**2 i-j i j 2 ans = min(ans, h) ans min(ans, h) min ans h print(ans) print ans ans = min(ans, h) min(ans, h) ans n = int(input()) int(input()) n x = list(map(int, input().split())) list(map(int, input().split())) x ans = float('inf') float('inf') ans h = 0 0 h h += (i-j)**2 (i-j)**2 h
n = int(input())
x = list(map(int, input().split()))

ans = float('inf')
for i in range(1, 101):
    h = 0
    for j in x:
        h += (i-j)**2
    ans = min(ans, h)
print(ans)