implicit none
integer n,m,x,i,c,d
integer,demension(:),allcocatable :: a(:)
read(*,*) n,m,x
allocate( a(m) )
do i=1,m
read(*,*) a(m)
enddo
c=0
d=0
do i=1,m
if ( a(i) > x ) then
c=c+1
else
d=d+1
endif
enddo
if ( c > d ) then
write(*,*) d
else
write(*,*) c
endif
stop
end
