import Data.Function
main=getLine>>getLine>>=print.(\p->fix(\f m p->if(null$tail p)then if m>=(p!!0)then 1 else 0 else if m>=(p!!0)then 1 + f(p!!0)(tail p)else f m(tail p))(length p)p).map read.words
