
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int cnt = 0;
        sc.close();
        for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        }
        System.out.println(cnt);
    }

    static int digit(int x){
        int res = 0;
        while(x > 0){
            x/=10;
            res++;
        }
        return res;

    }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int cnt = 0;
        sc.close();
        for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        }
        System.out.println(cnt);
    }

    static int digit(int x){
        int res = 0;
        while(x > 0){
            x/=10;
            res++;
        }
        return res;

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int cnt = 0;
        sc.close();
        for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int cnt = 0;
        sc.close();
        for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 0; cnt 0 sc.close() sc.close sc for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            if(digit(i)%2==1){
                cnt++;
            }
        } {
            if(digit(i)%2==1){
                cnt++;
            }
        } if(digit(i)%2==1){
                cnt++;
            } digit(i)%2==1 digit(i)%2 digit(i) digit i 2 1 {
                cnt++;
            } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args static int digit(int x){
        int res = 0;
        while(x > 0){
            x/=10;
            res++;
        }
        return res;

    } digit {
        int res = 0;
        while(x > 0){
            x/=10;
            res++;
        }
        return res;

    } int res = 0; res 0 while(x > 0){
            x/=10;
            res++;
        } x > 0 x 0 {
            x/=10;
            res++;
        } x/=10 x 10 res++ res return res; res int x x public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int cnt = 0;
        sc.close();
        for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        }
        System.out.println(cnt);
    }

    static int digit(int x){
        int res = 0;
        while(x > 0){
            x/=10;
            res++;
        }
        return res;

    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int cnt = 0;
        sc.close();
        for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        }
        System.out.println(cnt);
    }

    static int digit(int x){
        int res = 0;
        while(x > 0){
            x/=10;
            res++;
        }
        return res;

    }

} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int cnt = 0;
        sc.close();
        for(int i=1;i<=n;i++){
            if(digit(i)%2==1){
                cnt++;
            }
        }
        System.out.println(cnt);
    }

    static int digit(int x){
        int res = 0;
        while(x > 0){
            x/=10;
            res++;
        }
        return res;

    }

}