eater::Int->Int->[Int]->Int
eater now high [] = now
eater now high (x:xs) = if x < high then eater now high xs else eater (now+1) x xs

main::IO()
main=do
  _<-getLine
  dat<-return.map read.words=<<getLine
  print (eater 0 0 dat)
