
import java.util.Scanner;

/**
 *
 * @author cs18097
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        }
        
        
        System.out.print(ans);
        
        
    }
    
} import java.util.Scanner; Scanner java.util public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        }
        
        
        System.out.print(ans);
        
        
    }
    
} Main /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        }
        
        
        System.out.print(ans);
        
        
    } main {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        }
        
        
        System.out.print(ans);
        
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        } {
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        } String tmp = String.valueOf(i); tmp String.valueOf(i) String.valueOf String i if(tmp.length()%2==1)ans++; tmp.length()%2==1 tmp.length()%2 tmp.length() tmp.length tmp 2 1 ans++ ans System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        }
        
        
        System.out.print(ans);
        
        
    }
    
} public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        }
        
        
        System.out.print(ans);
        
        
    }
    
} Main

import java.util.Scanner;

/**
 *
 * @author cs18097
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i = 1;i <= n;i++){
            String tmp = String.valueOf(i);
            if(tmp.length()%2==1)ans++;
        }
        
        
        System.out.print(ans);
        
        
    }
    
}
