import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                }
                System.out.println(yono);
        }
}//0=48
 //a=97 a -> +26 = 123
//鶏になれ import java.util.*; util.* java public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                }
                System.out.println(yono);
        }
}//0=48 Main public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                }
                System.out.println(yono);
        } main {
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                }
                System.out.println(yono);
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int yono = 0; yono 0 for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                } int i = 1 ; int i = 1 ; i 1 i <= n i n i++ i++ i {
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                } {
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                } int keta = (int)Math.log10(i); keta (int)Math.log10(i) Math.log10 Math i keta = keta % 2 keta keta % 2 keta 2 if(keta == 0)yono++; keta == 0 keta 0 yono++ yono System.out.println(yono) System.out.println System.out System System.out yono String[] args args public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                }
                System.out.println(yono);
        }
}//0=48 public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                }
                System.out.println(yono);
        }
}//0=48 Main
import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                for(int i = 1 ; i <= n ; i++){
                        int keta = (int)Math.log10(i);
                        keta = keta % 2;
                        if(keta == 0)yono++;
                }
                System.out.println(yono);
        }
}//0=48
 //a=97 a -> +26 = 123
//鶏になれ