import java.util.*;
public class Main {
public static void main(String args[])
{
  Scanner sp=new Scanner(System.in);
    int n=sp.nextInt();
    int sc=0;
    int l=(int) (Math.log10(n) + 1);
 
    if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
}
}
	
	
	 import java.util.*; util.* java public class Main {
public static void main(String args[])
{
  Scanner sp=new Scanner(System.in);
    int n=sp.nextInt();
    int sc=0;
    int l=(int) (Math.log10(n) + 1);
 
    if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
}
} Main public static void main(String args[])
{
  Scanner sp=new Scanner(System.in);
    int n=sp.nextInt();
    int sc=0;
    int l=(int) (Math.log10(n) + 1);
 
    if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
} main {
  Scanner sp=new Scanner(System.in);
    int n=sp.nextInt();
    int sc=0;
    int l=(int) (Math.log10(n) + 1);
 
    if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
} Scanner sp=new Scanner(System.in); sp new Scanner(System.in) int n=sp.nextInt(); n sp.nextInt() sp.nextInt sp int sc=0; sc 0 int l=(int) (Math.log10(n) + 1); l (int) (Math.log10(n) + 1) Math.log10(n) Math.log10 Math n 1 if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    } l%2==0 l%2 l 2 0 {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    } for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     } int i=n; int i=n; i n i>0 i 0 i-- i-- i {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     } {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     } int sn=(int) (Math.log10(i) + 1); sn (int) (Math.log10(i) + 1) Math.log10(i) Math.log10 Math i 1 if(!(sn%2==0))
         {
          sc++;  
         } !(sn%2==0) (sn%2==0) sn%2 sn 2 0 {
          sc++;  
         } sc++ sc System.out.println(sc) System.out.println System.out System System.out sc {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    } for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     } int i=n; int i=n; i n i>0 i 0 i-- i-- i {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     } {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     } int sn=(int) (Math.log10(i) + 1); sn (int) (Math.log10(i) + 1) Math.log10(i) Math.log10 Math i 1 if(!(sn%2==0))
         {
          sc++;  
         } !(sn%2==0) (sn%2==0) sn%2 sn 2 0 {
          sc++;  
         } sc++ sc System.out.println(sc) System.out.println System.out System System.out sc String args[] args public class Main {
public static void main(String args[])
{
  Scanner sp=new Scanner(System.in);
    int n=sp.nextInt();
    int sc=0;
    int l=(int) (Math.log10(n) + 1);
 
    if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
}
} public class Main {
public static void main(String args[])
{
  Scanner sp=new Scanner(System.in);
    int n=sp.nextInt();
    int sc=0;
    int l=(int) (Math.log10(n) + 1);
 
    if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
}
} Main
import java.util.*;
public class Main {
public static void main(String args[])
{
  Scanner sp=new Scanner(System.in);
    int n=sp.nextInt();
    int sc=0;
    int l=(int) (Math.log10(n) + 1);
 
    if(l%2==0)
    
     {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
    else
    {
     for(int i=n;i>0;i--)
     {
        int sn=(int) (Math.log10(i) + 1);
        if(!(sn%2==0))
         {
          sc++;  
         }
     }
      System.out.println(sc);
    }
}
}
	
	
	
