import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [n,m,x] <- map (read::String->Int) . words <$> getLine
  as <- map (read::String->Int) . words <$> getLine
  let to0 = length [s|s<-as, s<x]
  let toN = length [t|t<-as, x<t]
  print $ min to0 toN