#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll n; cin>>n; vector P(n); rep(i,n) cin>>P[i]; ll num; rep(i,n){ if(P[i]==n) num=i+1; } cout<