let count array =
  let rec count' array i max res =
    if i >= Array.length array then res
    else if array.(i) >= max then count' array (i + 1) array.(i) (res + 1)
    else count' array (i + 1) max res in
  count' array 0 0 0
;;

let () = Scanf.scanf "%d" (fun n ->
  Array.init n (fun _ -> Scanf.scanf " %d" (fun hi -> hi)) |> count |> print_int
);;