#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#define int long long
#define mod 1000000007
#define for0(i, n) for(int i = 0; i < (n); i++)
#define for1(i, n) for(int i = 1; i <= (n);i++)
#define mp make_pair
using namespace std;
int a[123456];
signed main() {
	int n; cin >> n;
	for1(i, n) { cin >> a[i]; }
	int ans1 = n, ans2 = a[n];
	for (int i = n; i >= 1; i--) {
		if (a[i] <= ans2) {
			ans2 = a[i];
			ans1 = i;
		}
	}
	cout << ans1 << endl;
}
