import java.util.Arrays;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String NN = keyboard.next();
			int N = Integer.parseInt(NN);
			
		int[] yama = new int[N];
			for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			}
			
		int count = 1;
		
		int max = yama[0];
		int min = 0;
		
		if (N > 1) {
			min = yama[1];
		}
		
		for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		}
			System.out.print(count);

		keyboard.close();	
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String NN = keyboard.next();
			int N = Integer.parseInt(NN);
			
		int[] yama = new int[N];
			for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			}
			
		int count = 1;
		
		int max = yama[0];
		int min = 0;
		
		if (N > 1) {
			min = yama[1];
		}
		
		for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		}
			System.out.print(count);

		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String NN = keyboard.next();
			int N = Integer.parseInt(NN);
			
		int[] yama = new int[N];
			for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			}
			
		int count = 1;
		
		int max = yama[0];
		int min = 0;
		
		if (N > 1) {
			min = yama[1];
		}
		
		for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		}
			System.out.print(count);

		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String NN = keyboard.next();
			int N = Integer.parseInt(NN);
			
		int[] yama = new int[N];
			for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			}
			
		int count = 1;
		
		int max = yama[0];
		int min = 0;
		
		if (N > 1) {
			min = yama[1];
		}
		
		for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		}
			System.out.print(count);

		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) String NN = keyboard.next(); NN keyboard.next() keyboard.next keyboard int N = Integer.parseInt(NN); N Integer.parseInt(NN) Integer.parseInt Integer NN int[] yama = new int[N]; yama new int[N] N for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			} int i=0; int i=0; i 0 i < N i N i++ i++ i {
				yama[i] = keyboard.nextInt();
			} {
				yama[i] = keyboard.nextInt();
			} yama[i] = keyboard.nextInt() yama[i] yama i keyboard.nextInt() keyboard.nextInt keyboard int count = 1; count 1 int max = yama[0]; max yama[0] yama 0 int min = 0; min 0 if (N > 1) {
			min = yama[1];
		} N > 1 N 1 {
			min = yama[1];
		} min = yama[1] min yama[1] yama 1 for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		} int j = 1; int j = 1; j 1 j < N j N j++ j++ j {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		} {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		} int height = yama[j]; height yama[j] yama j if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    } height >= max height max {
		        max = height;
		        count ++;
		        continue;
		    } max = height max height count ++ count continue; {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    } if (height < min) {
		    		min = height;
		    		continue;
		    	} height < min height min {
		    		min = height;
		    		continue;
		    	} min = height min height continue; System.out.print(count) System.out.print System.out System System.out count keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String NN = keyboard.next();
			int N = Integer.parseInt(NN);
			
		int[] yama = new int[N];
			for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			}
			
		int count = 1;
		
		int max = yama[0];
		int min = 0;
		
		if (N > 1) {
			min = yama[1];
		}
		
		for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		}
			System.out.print(count);

		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String NN = keyboard.next();
			int N = Integer.parseInt(NN);
			
		int[] yama = new int[N];
			for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			}
			
		int count = 1;
		
		int max = yama[0];
		int min = 0;
		
		if (N > 1) {
			min = yama[1];
		}
		
		for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		}
			System.out.print(count);

		keyboard.close();	
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String NN = keyboard.next();
			int N = Integer.parseInt(NN);
			
		int[] yama = new int[N];
			for(int i=0; i < N; i++) {
				yama[i] = keyboard.nextInt();
			}
			
		int count = 1;
		
		int max = yama[0];
		int min = 0;
		
		if (N > 1) {
			min = yama[1];
		}
		
		for (int j = 1; j < N; j++) {
		    int height = yama[j];
		    if ( height >= max) {
		        max = height;
		        count ++;
		        continue;
		    }else {
		    	if (height < min) {
		    		min = height;
		    		continue;
		    	}
		    }
		}
			System.out.print(count);

		keyboard.close();	
	}
}