program sample
	implicit none
    integer(8) :: N,i,j,count
    integer(8),allocatable :: A(:)
    
    read(*,*) N
    
    allocate(A(N))
    read(*,*) A
    
    count=0
    
    do i=1,N
    	do j=1,N
        	if (i/=j) then
            	if (mod(A(i),A(j)) ==0) then
                	count = count +1
                    exit
                end if
            end if
            !write(*,*) i
        end do
	end do
    write(*,*) N-count
	deallocate(A)
    stop
end program sample