PROGRAM ATCODER

implicit none
integer :: n,count=0,i
integer,allocatable :: h(:)

read*, n
allocate(h(n))
read*, h(1:n)

do i = 1, n, 1
  if ( h(i) >= maxval(h(1:i)) ) then
    count = count + 1
  end if
end do

print'(i0)', count

END PROGRAM ATCODER
