
import java.io.*;
import java.util.*;

public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int c=0;
		for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		}
		
		System.out.println(c);		
	}
}

 import java.io.*; io.* java import java.util.*; util.* java public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int c=0;
		for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		}
		
		System.out.println(c);		
	}
} Main public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int c=0;
		for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		}
		
		System.out.println(c);		
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int c=0;
		for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		}
		
		System.out.println(c);		
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n=Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int c=0; c 0 for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		} {
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		} if((((int)Math.log10(i)+1) & 1) == 1)
				++c; (((int)Math.log10(i)+1) & 1) == 1 (((int)Math.log10(i)+1) & 1) ((int)Math.log10(i)+1) (int)Math.log10(i) Math.log10 Math i 1 1 1 ++c c System.out.println(c) System.out.println System.out System System.out c String []args args public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int c=0;
		for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		}
		
		System.out.println(c);		
	}
} public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int c=0;
		for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		}
		
		System.out.println(c);		
	}
} Main

import java.io.*;
import java.util.*;

public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int c=0;
		for(int i=1;i<=n;i++)
		{
			if((((int)Math.log10(i)+1) & 1) == 1)
				++c;
		}
		
		System.out.println(c);		
	}
}


