program main
   implicit none
   integer,allocatable,dimension(:)::a
   integer::n,i,ma,counter=0
   read(*,*)n
   allocate(a(n))
   read(*,*)a
   ma=a(1)
   do i=1,n
     if(ma<=a(i))then
       counter=counter+1
       ma=a(i)
     endif
   enddo
   write(*,*)counter
end program main
