io = STDIN
N=io.gets.to_i
ar=N.times.map{io.gets.to_i}
if N>=3
  chunk= ar.chunk_while{|i,j|i<j}.to_a
  if chunk.size==2
    p 2
  else
    cnt = 0
    chunk.each_cons(3) do |a,b,c|
      if a.last < c.first
      else
        cnt+=1
      end
    end
    p cnt+2
  end
else
  if N==1
    puts 1
  else
    if ar[0]<ar[1]
      puts 1
    else
      puts 2
    end
  end
end