#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int arr[n];
int count = 1;
for(int i=0; i<n; i++)
scanf("%d", &arr[i]);
int max = arr[n-1];
for(int i=n-1; i>=0; i--){
if(max < arr[i]){
max = arr[i];
count++;
}
}
printf("%d", count);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: