All positive integers from to are written consecutively from left to right: .
How many ways are there to cross out all the digits of the obtained number, except four, so that the remaining digits form the number without rearrangement?
For example, for n = 20 from the number , you can obtain only in one way:
1 34567891 0 111 2 131 4 151617181920
One positive integer n~(n \le 10^5).
Print the number of possible ways to obtain the number .
Example 1
Example 2
Example 3