import java.util.*;
public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
      	int count=0;
      	for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        }
		System.out.println(count);
		
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
      	int count=0;
      	for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        }
		System.out.println(count);
		
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
      	int count=0;
      	for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        }
		System.out.println(count);
		
	} main {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
      	int count=0;
      	for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        }
		System.out.println(count);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc int count=0; count 0 for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i+=2 i+=2 i 2 {
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        } {
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        } if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          } i+1==s.length() i+1 i 1 s.length() s.length s {
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          } count+=Integer.parseInt(s)-Math.pow(10,i)+1 count Integer.parseInt(s)-Math.pow(10,i)+1 Integer.parseInt(s)-Math.pow(10,i) Integer.parseInt(s) Integer.parseInt Integer s Math.pow(10,i) Math.pow Math 10 i 1 {
          count+=Math.pow(10,i)*9;
          } count+=Math.pow(10,i)*9 count Math.pow(10,i)*9 Math.pow(10,i) Math.pow Math 10 i 9 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
      	int count=0;
      	for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        }
		System.out.println(count);
		
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
      	int count=0;
      	for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        }
		System.out.println(count);
		
	}
} Main
import java.util.*;
public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
      	int count=0;
      	for(int i=0;i<s.length();i+=2){
          if(i+1==s.length()){
          	count+=Integer.parseInt(s)-Math.pow(10,i)+1;
          }else{
          count+=Math.pow(10,i)*9;
          }
        }
		System.out.println(count);
		
	}
}