
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        if(n<10){
            System.out.println(n);
            return;
        }
        int len = s.length();
        String r = "";
        for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        }
        Integer b = Integer.valueOf(r);
        if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        }
        System.out.println(b);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        if(n<10){
            System.out.println(n);
            return;
        }
        int len = s.length();
        String r = "";
        for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        }
        Integer b = Integer.valueOf(r);
        if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        }
        System.out.println(b);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        if(n<10){
            System.out.println(n);
            return;
        }
        int len = s.length();
        String r = "";
        for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        }
        Integer b = Integer.valueOf(r);
        if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        }
        System.out.println(b);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        if(n<10){
            System.out.println(n);
            return;
        }
        int len = s.length();
        String r = "";
        for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        }
        Integer b = Integer.valueOf(r);
        if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        }
        System.out.println(b);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n = Integer.valueOf(s); n Integer.valueOf(s) Integer.valueOf Integer s if(n<10){
            System.out.println(n);
            return;
        } n<10 n 10 {
            System.out.println(n);
            return;
        } System.out.println(n) System.out.println System.out System System.out n return; int len = s.length(); len s.length() s.length s String r = ""; r "" for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        } int i=1; int i=1; i 1 i<len i len i++ i++ i {
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        } {
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        } if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            } i%2==1 i%2 i 2 1 {
                r = "9" + r;
            } r = "9" + r r "9" + r "9" r {
                r = "0" + r;
            } r = "0" + r r "0" + r "0" r Integer b = Integer.valueOf(r); b Integer.valueOf(r) Integer.valueOf Integer r if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        } len%2==1 len%2 len 2 1 {
            b += n - (int)Math.pow(10, len-1) + 1;
        } b += n - (int)Math.pow(10, len-1) + 1 b n - (int)Math.pow(10, len-1) + 1 n - (int)Math.pow(10, len-1) n (int)Math.pow(10, len-1) Math.pow Math 10 len-1 len 1 1 System.out.println(b) System.out.println System.out System System.out b String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        if(n<10){
            System.out.println(n);
            return;
        }
        int len = s.length();
        String r = "";
        for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        }
        Integer b = Integer.valueOf(r);
        if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        }
        System.out.println(b);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        if(n<10){
            System.out.println(n);
            return;
        }
        int len = s.length();
        String r = "";
        for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        }
        Integer b = Integer.valueOf(r);
        if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        }
        System.out.println(b);
    }
} Main

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        if(n<10){
            System.out.println(n);
            return;
        }
        int len = s.length();
        String r = "";
        for(int i=1;i<len;i++){
            if(i%2==1){
                r = "9" + r;
            }
            else{
                r = "0" + r;
            }
        }
        Integer b = Integer.valueOf(r);
        if(len%2==1){
            b += n - (int)Math.pow(10, len-1) + 1;
        }
        System.out.println(b);
    }
}