using System.Collections.Generic;
public static void Main()
Dictionary<int,int> indexToValue = new Dictionary<int,int>();
Int32.Parse(System.Console.ReadLine());
string values = System.Console.ReadLine();
string [] plantValues = values.Split(' ');
Stack<Tuple<int,int>> plants = new Stack<Tuple<int,int>>();
for(int i=0;i<plantValues.Length;i++)
indexToValue[i+1]=Int32.Parse(plantValues[i]);
plants.Push(new Tuple<int, int>(i+1,Int32.Parse(plantValues[i])));
Stack<Tuple<int,int>> temp = new Stack<Tuple<int,int>>();
if(plants.Count==0 || plants.Count==1 || numEliminated==-1)
var rightPlant = plants.Pop();
if(indexToValue[rightPlant.Item1]>indexToValue[plants.Peek().Item1])
System.Console.WriteLine(numberOfDays);