function main(input) {
    const args = input.split('\n');
	const  n = args[0]
	const elements = args[1].split(' ')	
	var tmp=1
    var arr=[]
    arr[0]=elements[0]
    for(var i=1;i<elements.length-1;i++){
      arr.sort((a,b)=>{a-b})

	  
	  if(arr[arr.length-1]>=elements[i])
	      arr.push(elements[i])
    }

	console.log(arr.length)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
