#include <iostream>
using namespace std;
int main()
{
int n ;
cin >> n;
int arr[n];
for ( int i = 0 ; i < n ; i ++ )
{
cin >> arr[i];
}
int min = arr[0];
int andis = 0;
for ( int i = 0 ; i < n - 1 ; i ++ )
{
if ( arr[i] < min )
{
min = arr[i];
andis = i;
}
}
cout << andis;
return 0;
}