import java.util.*;
import java.util.Arrays;
public class Main{
    
    public static boolean keta(int k){
        int ans =0;
        while(k>0){
            k /=10;
            ans++;

        }
        if(ans%2==0){
            return false;

        }
        else{
            return true;
        }
    }
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count =0;
        for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        }
        System.out.println(count);

        
        
    }
   
    
       
    
} import java.util.*; util.* java import java.util.Arrays; Arrays java.util public class Main{
    
    public static boolean keta(int k){
        int ans =0;
        while(k>0){
            k /=10;
            ans++;

        }
        if(ans%2==0){
            return false;

        }
        else{
            return true;
        }
    }
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count =0;
        for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        }
        System.out.println(count);

        
        
    }
   
    
       
    
} Main public static boolean keta(int k){
        int ans =0;
        while(k>0){
            k /=10;
            ans++;

        }
        if(ans%2==0){
            return false;

        }
        else{
            return true;
        }
    } keta {
        int ans =0;
        while(k>0){
            k /=10;
            ans++;

        }
        if(ans%2==0){
            return false;

        }
        else{
            return true;
        }
    } int ans =0; ans 0 while(k>0){
            k /=10;
            ans++;

        } k>0 k 0 {
            k /=10;
            ans++;

        } k /=10 k 10 ans++ ans if(ans%2==0){
            return false;

        }
        else{
            return true;
        } ans%2==0 ans%2 ans 2 0 {
            return false;

        } return false; false {
            return true;
        } return true; true int k k public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count =0;
        for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        }
        System.out.println(count);

        
        
    } main {
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count =0;
        for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        }
        System.out.println(count);

        
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count =0; count 0 for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            if(keta(i)){
                count++;

            }
        } {
            if(keta(i)){
                count++;

            }
        } if(keta(i)){
                count++;

            } keta(i) keta i {
                count++;

            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
    
    public static boolean keta(int k){
        int ans =0;
        while(k>0){
            k /=10;
            ans++;

        }
        if(ans%2==0){
            return false;

        }
        else{
            return true;
        }
    }
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count =0;
        for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        }
        System.out.println(count);

        
        
    }
   
    
       
    
} public class Main{
    
    public static boolean keta(int k){
        int ans =0;
        while(k>0){
            k /=10;
            ans++;

        }
        if(ans%2==0){
            return false;

        }
        else{
            return true;
        }
    }
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count =0;
        for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        }
        System.out.println(count);

        
        
    }
   
    
       
    
} Main
import java.util.*;
import java.util.Arrays;
public class Main{
    
    public static boolean keta(int k){
        int ans =0;
        while(k>0){
            k /=10;
            ans++;

        }
        if(ans%2==0){
            return false;

        }
        else{
            return true;
        }
    }
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count =0;
        for(int i=1;i<=n;i++){
            if(keta(i)){
                count++;

            }
        }
        System.out.println(count);

        
        
    }
   
    
       
    
}