(* O(n) (n = length of list) *)
let rec list_find_fold_left f a = function
| [] -> a, false
| x :: xs ->
  let res, detected = f a x in
  if detected then
    res, detected
  else
    list_find_fold_left f res xs

(* O(n) *)
let can_view i h hs =
  list_find_fold_left
    (fun (res, j) h' ->
      if j >= i then
        (true, j), true
      else
        if h' > h then
          (res, j), true
        else
          (res, j + 1), false)
    (false, 0)
    hs |> fst |> fst

(* O(n^2) *)
let solve n hs =
  List.fold_left
    (fun (count, i) h ->
      if can_view i h hs then
        count + 1, i + 1
      else
        count, i + 1)
    (0, 0)
    hs |> fst

let read_ints () = read_line () |> Str.split (Str.regexp " ") |> List.map int_of_string

let _ =
  let n = read_int () in
  let hs = read_ints () in
  solve n hs |> string_of_int |> print_endline