import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] NS = new String[N];
        int[] l = new int[N];
        int ans = 0;

        for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] NS = new String[N];
        int[] l = new int[N];
        int ans = 0;

        for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] NS = new String[N];
        int[] l = new int[N];
        int ans = 0;

        for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] NS = new String[N];
        int[] l = new int[N];
        int ans = 0;

        for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] NS = new String[N]; NS new String[N] N int[] l = new int[N]; l new int[N] N int ans = 0; ans 0 for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        } {
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        } NS[i] = String.valueOf(i+1) NS[i] NS i String.valueOf(i+1) String.valueOf String i+1 i 1 l[i] = NS[i].length() l[i] l i NS[i].length() NS[i].length NS[i] NS i if(l[i]%2!=0){
                ans += 1;
            } l[i]%2!=0 l[i]%2 l[i] l i 2 0 {
                ans += 1;
            } ans += 1 ans 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] NS = new String[N];
        int[] l = new int[N];
        int ans = 0;

        for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        }
        System.out.println(ans);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] NS = new String[N];
        int[] l = new int[N];
        int ans = 0;

        for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] NS = new String[N];
        int[] l = new int[N];
        int ans = 0;

        for(int i=0; i<N; i++){
            NS[i] = String.valueOf(i+1);
            l[i] = NS[i].length();
            if(l[i]%2!=0){
                ans += 1;
            } 
        }
        System.out.println(ans);
    }
}