import java.util.*;
import java.util.Scanner;

class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        long ans = 0;
        for(int i=N;i>0;i--){
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java import java.util.Scanner; Scanner java.util class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        long ans = 0;
        for(int i=N;i>0;i--){
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        long ans = 0;
        for(int i=N;i>0;i--){
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        long ans = 0;
        for(int i=N;i>0;i--){
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long ans = 0; ans 0 for(int i=N;i>0;i--){
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        } int i=N; int i=N; i N i>0 i 0 i-- i-- i {
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        } {
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        } if(Math.floor(Math.log10(i))%2==0){
                ans++;
            } Math.floor(Math.log10(i))%2==0 Math.floor(Math.log10(i))%2 Math.floor(Math.log10(i)) Math.floor Math Math.log10(i) Math.log10 Math i 2 0 {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.*;
import java.util.Scanner;

class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        long ans = 0;
        for(int i=N;i>0;i--){
            if(Math.floor(Math.log10(i))%2==0){
                ans++;
            }
        }
        System.out.println(ans);
    }
}