main = do
  (n:m:x:xs) <- map read . words <$> getLine
  ms <- map read . words <$> getLine
  putStrLn . show $ solve x ms

solve :: Int -> [Int] -> Int
solve x ms = 
  let (l,r) = foldl (\(a,b) k -> if k < x then (a+1,b) else (a,b+1)) (0,0) ms
  in min l r
