
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
	        String N = scan.next();


	        //23456
	        //123456
	        long sum = 0L;
	        if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        }
	        if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        }

	        long n = Long.parseLong(N)/10;

	        while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        }
	       	System.out.println(sum);

	       	scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
	        String N = scan.next();


	        //23456
	        //123456
	        long sum = 0L;
	        if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        }
	        if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        }

	        long n = Long.parseLong(N)/10;

	        while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        }
	       	System.out.println(sum);

	       	scan.close();
	}
} Main public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
	        String N = scan.next();


	        //23456
	        //123456
	        long sum = 0L;
	        if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        }
	        if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        }

	        long n = Long.parseLong(N)/10;

	        while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        }
	       	System.out.println(sum);

	       	scan.close();
	} main {
		 Scanner scan = new Scanner(System.in);
	        String N = scan.next();


	        //23456
	        //123456
	        long sum = 0L;
	        if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        }
	        if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        }

	        long n = Long.parseLong(N)/10;

	        while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        }
	       	System.out.println(sum);

	       	scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String N = scan.next(); N scan.next() scan.next scan long sum = 0L; sum 0L if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        } N.length() ==1 N.length() N.length N 1 {
	        	System.out.println(N);
	        	return;
	        } System.out.println(N) System.out.println System.out System System.out N return; if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        } N.length()%2 ==1 N.length()%2 N.length() N.length N 2 1 {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        } sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1) sum Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1) Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1) Long.parseLong( N.substring(1, N.length())) Long.parseLong Long N.substring(1, N.length()) N.substring N 1 N.length() N.length N 1 (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1) (Long.parseLong( N.substring(0, 1))-1) Long.parseLong( N.substring(0, 1)) Long.parseLong Long N.substring(0, 1) N.substring N 0 1 1 (long)Math.pow(10, N.length()-1) Math.pow Math 10 N.length()-1 N.length() N.length N 1 long n = Long.parseLong(N)/10; n Long.parseLong(N)/10 Long.parseLong(N) Long.parseLong Long N 10 while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        } n>0 n 0 {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        } int digit = String.valueOf(n).length(); digit String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	} digit % 2 ==1 digit % 2 digit 2 1 {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	} sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) ) sum (long)(Math.pow(10, digit) - Math.pow(10, digit-1) ) Math.pow(10, digit) Math.pow Math 10 digit Math.pow(10, digit-1) Math.pow Math 10 digit-1 digit 1 n /=10 n 10 System.out.println(sum) System.out.println System.out System System.out sum scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
	        String N = scan.next();


	        //23456
	        //123456
	        long sum = 0L;
	        if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        }
	        if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        }

	        long n = Long.parseLong(N)/10;

	        while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        }
	       	System.out.println(sum);

	       	scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
	        String N = scan.next();


	        //23456
	        //123456
	        long sum = 0L;
	        if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        }
	        if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        }

	        long n = Long.parseLong(N)/10;

	        while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        }
	       	System.out.println(sum);

	       	scan.close();
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
	        String N = scan.next();


	        //23456
	        //123456
	        long sum = 0L;
	        if(N.length() ==1) {
	        	System.out.println(N);
	        	return;
	        }
	        if(N.length()%2 ==1) {
	        	//sum += Integer.parseInt( N.substring(1, N.length()))+1;
	        	sum += Long.parseLong( N.substring(1, N.length()))+1  + (Long.parseLong( N.substring(0, 1))-1)* (long)Math.pow(10, N.length()-1);
	        }

	        long n = Long.parseLong(N)/10;

	        while(n>0) {
	        	int digit = String.valueOf(n).length();
	        	if(digit % 2 ==1) {
	        		sum+= (long)(Math.pow(10, digit) - Math.pow(10, digit-1) );
	        	}
	        	n /=10;

	        }
	       	System.out.println(sum);

	       	scan.close();
	}
}
