module Main where

import           Control.Monad
import           Data.List
import           Data.Ord
import           Data.List.Split
import           Data.Array.IO
import qualified Data.Vector.Unboxed as V

main :: IO ()
main = do
  [n, _, x] <- map read . words <$> getLine :: IO [Int]
  (ls, gs) <- partition (> x) . map read . words <$> getLine
  print . minimum $ map length [ls, gs]