program main
    implicit none
    integer n,i,j,p
    integer,allocatable::a(:)
    read(*,*) n
    allocate(a(n))
    read(*,*) a(2:n)
    do i=1,n
        p=0
        do j=i+1,n
            if(a(j)-i>0) exit
            if(a(j)-i==0) p=p+1
        end do
        write(*,*) p 
    end do
    deallocate(a(:))
end program main
