import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  [n, m, x] <- map (read::String -> Int) . words <$> getLine
  arr <- map (read::String -> Int) . words <$> getLine
  let cost1 = foldl (\acc i -> if i < x then acc + 1 else acc) 0 arr
      cost2 = m - cost1
  print $ min cost1 cost2