include <bits/stdc++.h>
using namespace std;

int main() {
	int  n,i, j, k = 1;
	cin >> n; 
	int az[20];
	for (i = 0; i = n - 1; i++) {
		cin >> az[i];
	}
	for (i = n; i = 19; i++) {
		az[i] = 0;
	}
	i = 0;
	while (az[i] < az[i+ 1]) {
		k++;
		i++;

	}
	cout << k << endl;
}