main = do
  [n,m,x] <- fmap (map read . words) getLine
  as <- fmap (map read . words) getLine
  print (solve n m x as)


solve :: Int -> Int -> Int -> [Int] -> Int
solve n m x as =
  min (length ls) (length rs)
  where
    (ls,rs) = span (<x) as