program name
    implicit none
    integer(4):: n
    integer(4),allocatable:: h(:)
    integer(4):: i,nmax,ans

    read*, n
    allocate(h(n))
    read*, h(:)
    nmax = 0
    ans = 0
    do i=1,n
        if (h(i) >= nmax) then
            nmax = h(i)
            ans=ans+1
        end if
    end do

    print*, ans
end program name