let () =
  Scanf.scanf "%d\n" @@ fun n ->
  let prr = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun d -> d in
  let ans = ref 0 in
  for i = 0 to Array.length prr - 1 do
    let a = Array.fold_left (fun minN x -> if minN > x then x else minN) prr.(i) (Array.sub prr 0 (i+1)) in
    if a = prr.(i) then ans := !ans + 1
  done;
  Printf.printf "%d\n" !ans