main = do
       e<-getLine
       e2<-getLine
       let (n:m:x:[])=map read (words e)::[Int]
           ys=map read (words e2)::[Int]
       putStrLn $ show $ min (length (takeWhile (< x) ys)) (length (dropWhile (< x) ys))  