import java.util.*;
public class Main {

 public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();
	String nine="090909";
	int loga=(int)Math.log10(a);
	if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	}
 }
} import java.util.*; util.* java public class Main {

 public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();
	String nine="090909";
	int loga=(int)Math.log10(a);
	if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	}
 }
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();
	String nine="090909";
	int loga=(int)Math.log10(a);
	if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	}
 } main {
	Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();
	String nine="090909";
	int loga=(int)Math.log10(a);
	if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	}
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc String nine="090909"; nine "090909" int loga=(int)Math.log10(a); loga (int)Math.log10(a) Math.log10 Math a if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	} loga%2==1 loga%2 loga 2 1 {
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	} System.out.println(Integer.parseInt(nine.substring(0,(loga+1)))) System.out.println System.out System System.out Integer.parseInt(nine.substring(0,(loga+1))) Integer.parseInt Integer nine.substring(0,(loga+1)) nine.substring nine 0 (loga+1) loga 1 {
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	} int f=0; f 0 if(loga>0)f=Integer.parseInt(nine.substring(0,loga)); loga>0 loga 0 f=Integer.parseInt(nine.substring(0,loga)) f Integer.parseInt(nine.substring(0,loga)) Integer.parseInt Integer nine.substring(0,loga) nine.substring nine 0 loga System.out.println((int)(f+(a-Math.pow(10,loga)+1))) System.out.println System.out System System.out (int)(f+(a-Math.pow(10,loga)+1)) f (a-Math.pow(10,loga)+1) a-Math.pow(10,loga) a Math.pow(10,loga) Math.pow Math 10 loga 1 String[] args args public class Main {

 public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();
	String nine="090909";
	int loga=(int)Math.log10(a);
	if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	}
 }
} public class Main {

 public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();
	String nine="090909";
	int loga=(int)Math.log10(a);
	if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	}
 }
} Main
import java.util.*;
public class Main {

 public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();
	String nine="090909";
	int loga=(int)Math.log10(a);
	if(loga%2==1){
		 System.out.println(Integer.parseInt(nine.substring(0,(loga+1))));
	}else{
		int f=0;
		if(loga>0)f=Integer.parseInt(nine.substring(0,loga));
		System.out.println((int)(f+(a-Math.pow(10,loga)+1)));
	}
 }
}
