#include <iostream>

using namespace std;

int main()
{
	int n ,a;
	int index;
	int z = 0;
	cin >> n;
	cin >> a;
	int min = a;
	for (int i = 1; i < n; ++i)
	{
		cin >> a;
		if (min > a)
		{
			min = a;
			index = i;
			z = 1;
		}
		
	}
	if (z == 0)
	{
		cout << 0;
	}
	else
	{
		cout << index;
	}
	

	return 0;
}