implicit none
integer n,i,j
integer :: counts=0,max_height=0
integer,allocatable,dimension(:)::h

read(5,*) n

allocate(h(n))

read(5,*) (h(i),i=1,n)

do j=1,n
if(h(j).ge.max_height) then
counts=counts+1
endif
max_height=max(max_height,h(j))
enddo

write(6,*) counts

deallocate(h)
end