Get 2024#11659

Get 2024

1 second
256 megabytes
Medium

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

Input

One positive integer n~(n \le 10^5).

Output

Print the number of possible ways to obtain the number .

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading