N = int(eval(input()))



count = 0

for i in range(1, N+1):

    s = str(i)

    if len(s) % 2 == 1:

        count += 1

print(count)
def main():



    N = int(eval(input()))

    ans = 0

    for i in range(1, N+1):

        s = str(i)

        if(len(s) % 2 == 1): ans +=1



    return ans



if __name__ == '__main__':

    print((main()))
N = int(eval(input()))
count = 0
for i in range(1, N + 1):
    s = str(i)
    if len(s) % 2 == 1:
        count += 1
print(count)

def main():
    N = int(eval(input()))
    ans = 0
    for i in range(1, N + 1):
        s = str(i)
        if len(s) % 2 == 1:
            ans += 1
    return ans


if __name__ == "__main__":
    print((main()))

-N = int(eval(input())) -count = 0 -for i in range(1, N + 1): -    s = str(i) -    if len(s) % 2 == 1: -        count += 1 -print(count) +def main(): +    N = int(eval(input())) +    ans = 0 +    for i in range(1, N + 1): +        s = str(i) +        if len(s) % 2 == 1: +            ans += 1 +    return ans + + +if __name__ == "__main__": +    print((main()))