Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Constraints

* 1 \leq N \leq 10^5

Input

Input is given from Standard Input in the following format:


N


Output

Print the number of positive integers less than or equal to N that have an odd number of digits.

Examples

Input

11


Output

9


Input

136


Output

46


Input

100000


Output

90909
import math as m

def has_odd_digits(i):
  if i > 10**5:
    raise Exception("?")
  if 0 <= i and i <= 9:
    return True
  elif 100 <= i and i <= 999:
    return True
  elif 10000 <= i and i <= 99999:
    return True
  return False

n = int(raw_input())
# 1 digit = 10
# 3 digit = 9*10*10 = 900
# 5 digit = 9*10*10*10*10 = 90000
x = m.log(n, 10)

p = 0
for i in xrange(n):
  if has_odd_digits(i+1):
    p += 1
print p
