/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++)
		a[i]=s.nextInt();
		int max=a[0];
		int min=a[0];
		int count=1;
		for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}}
		System.out.println(count);}} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++)
		a[i]=s.nextInt();
		int max=a[0];
		int min=a[0];
		int count=1;
		for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}}
		System.out.println(count);}} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++)
		a[i]=s.nextInt();
		int max=a[0];
		int min=a[0];
		int count=1;
		for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}}
		System.out.println(count);} main {
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++)
		a[i]=s.nextInt();
		int max=a[0];
		int min=a[0];
		int count=1;
		for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}}
		System.out.println(count);} Scanner s=new Scanner(System.in); s new Scanner(System.in) int n=s.nextInt(); n s.nextInt() s.nextInt s int a[]=new int[n]; a new int[n] n for(int i=0;i<n;i++)
		a[i]=s.nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i]=s.nextInt(); a[i]=s.nextInt() a[i] a i s.nextInt() s.nextInt s int max=a[0]; max a[0] a 0 int min=a[0]; min a[0] a 0 int count=1; count 1 for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}} int i=1; int i=1; i 1 i<n i n i++ i++ i {if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}} {if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}} if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];} a[i]<=max && a[i]<min a[i]<=max a[i] a i max a[i]<min a[i] a i min {count++;min=a[i];} count++ count min=a[i] min a[i] a i {max=a[i];} max=a[i] max a[i] a i System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++)
		a[i]=s.nextInt();
		int max=a[0];
		int min=a[0];
		int count=1;
		for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}}
		System.out.println(count);}} public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++)
		a[i]=s.nextInt();
		int max=a[0];
		int min=a[0];
		int count=1;
		for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}}
		System.out.println(count);}} Main
/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++)
		a[i]=s.nextInt();
		int max=a[0];
		int min=a[0];
		int count=1;
		for(int i=1;i<n;i++)
		{if(a[i]<=max && a[i]<min)
		{count++;min=a[i];}
		else
		{max=a[i];}}
		System.out.println(count);}}