program gob
    implicit none
    integer :: n=0,i=0,is_DomainOver=0,j=0,is_fault=0,cnt=1
    integer, allocatable :: H(:)
    read(*,*)n
    allocate(H(n))
    read(*,*) (H(i),i=1,n)
    !Domein check
    if(n<1 .or. 20<n)then
        is_DomainOver = 1
    endif
    do i=1,n
        if(H(i)<1 .or. 100<H(i))then
            is_DomainOver = 1
        endif
    enddo
    if(is_DomainOver == 1)then
    else
        do i=2,n
            if(H(i)<H(i-1))then
            else
                do j=1,i-1
                    if(H(i)<H(j))then
                        is_fault = 1
                    else
                    endif
                enddo
                if(.not. is_fault == 1)then
                    cnt = cnt + 1
                endif
            endif
        enddo
        write(*,*)cnt
    endif
    deallocate(H)
end program gob