program unevennumbers

implicit none

integer::n,i,l,count=0,t=0

read*,n

!print*,n

do i=1,n
   if(i<10) then
      count=count+1
   else if(10<=i .and. i<100)then
      continue
   else if(100<=i .and. i<1000)then
      count=count+1
   else if(1000<=i .and. i<10000)then
      continue
   else
      count=count+1
   end if
end do

print*,count

end program unevennumbers