import Control.Monad
import Text.Printf
import Control.Applicative

main :: IO()
main = do
  [n, m, x] <- map read . words <$> getLine
  a <- map read . words <$> getLine
  printf "%s" $ slv n m x a

slv :: Int -> Int -> Int -> [Int] -> String
slv n m x a | slen > tlen = show tlen
            | otherwise = show slen
  where (s, t) = span (< x) a
        slen = length s
        tlen = length t
