Alice loves numbers, especially monodigit numbers. She calls a positive integer monodigit if and only if the integer contains exactly one type of digit. For example, , and are monodigit numbers, while , , are not.
Now, she wants to count the number of monodigit integers from to (inclusive). Can you help her?
Input
輸入只有一個正整數,。
The input consists of only one integer .
Output
輸出一個正整數, 和 之間(含)獨位數的數量。
Output exactly one positive integer, the number of monodigit integers from to (inclusive).