main = do
  [n,_,x] <- map read . words <$> getLine
  as <- map read . words <$> getLine
  let s1 = length (filter (\y -> x<y&&y<=n) as)
      s2 = length (filter (\y -> 0<y&&y<x) as)
    in putStrLn $ show $ min s1 s2
