program ABC145C
    implicit none
    integer(8)::N,i,j
    real(8)::dim=0
    real(8)::p=1
    real(8),allocatable,dimension(:)::X,Y

    read(5,*)N
    allocate(X(N))
    allocate(Y(N))

    do i=1,N
        read(5,*)X(i),Y(i)
    end do

    do i=1,N-1
        do j=i+1,N
            dim=dim+sqrt((X(i)-X(j))**2+(Y(i)-Y(j))**2)
        end do
    end do

    print'(f0.10)',2*dim/N
end program ABC145C