let rec f n ans arr =
  if n = 0 then ans
  else
    let subarr = Array.sub arr 0 n in
    let c = Array.get arr n in
    let m = Array.fold_right max subarr c in
    if m <= c then f (n-1) (ans+1) arr
    else f (n-1) ans arr
let () =
  Scanf.scanf "%d\n"
    (fun n ->
       Array.init n (fun _ -> Scanf.scanf " %d" (fun x -> x)) |> f (n-1) 1)
  |> print_int