import std.stdio, std.math, std.algorithm, std.array, std.string, std.conv, std.container, std.range;

void main() {
    int n = readln.chomp.to!int;
    iota(1, n+1).filter!(i => i.to!string.length & 1)
                .array
                .length
                .writeln;
}