let () = Scanf.scanf "%d\n" @@ fun n ->
  let hs = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun h -> h in
  Printf.printf "%d\n" @@ snd @@ Array.fold_left (fun (m, acc) h ->
    max m h, acc + if m <= h then 1 else 0) (min_int, 0) hs