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

int main() {
  int N;
  int X;
  X=1;
  cin >> N;
  vector<int> vec(101);
  
  for (int i = 1; i < N+1; i++) {
  cin >> vec.at(i);
  }
  
   if (vec.at(i) == *max_element(vec.begin(), vec.end())) {
      cout << i << endl;
     i=a;
     X++;
     }
  
   for (int k = 1; k < N+1; k++) {  
     
   if (vec.at(k) == *max_element(vec.begin(), vec.at(a))) {
      cout << a << endl;
     k=a;
     X++;
     }
     
  if (vec.at(k) == vec.at(k)) {
break
     }
     
  }

   cout << X << endl;
}

