{-
A_iのうち、Xより大きいものの数と、小さいものの数のうち小さいもの
-}
import Data.List
solver::[Int]->Int->Int
solver prs x = let (a,b) = (span (\y-> y<x) prs) in min (length a) (length b)

main::IO()
main=do
  nmxc<-getLine
  let n:m:x:[] = map read (words nmxc)
  d<-getLine
  let dat = map read (words d)
  print (solver dat x)
