main :: IO ()
main = do
    n <- (map read) . words <$> getLine
    a <- (map read) . words <$> getLine
    putStrLn $ show $ solve n a

solve :: [Int] -> [Int] -> Int
solve n a =
    let m = n !! 1
        x = n !! 2
        l = length $ filter (\b -> b < x) a
    in min l (m - l)