How many numbers
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
At the faculty of mathematics, Orhan was faced with the following problem: find the number of positive integers from to , which all digits are different.
Since Orkhan also goes to computer science classes at FizMat Lyceum, he easily wrote a program that calculates the answer. And can you do it?
Input
One integer .
Output
Print the number of required positive integers.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 991
Acceptance rate 29%