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

void main() {
    const N = readln.chomp.to!long;

    iota(1,N+1).filter!(x => x < 10 || (100 <= x && x < 1000) || (10000 <= x && x < 100000)).walkLength.writeln;
}

