PROGRAMMING:Sum of specific numbers
Xiao Li is very interested in numbers containing 2, 0, 1 and 9 (excluding leading 0). Among the numbers from 1 to 40, there are 28 such numbers, including 1, 2, 9, 10 to 32, 39 and 40. Their sum is 574. What is the sum of all such numbers from 1 to n?
###Input format:
The input line contains an integer n.
###Output format:
Output a line containing an integer that represents the sum of the numbers that satisfy the condition.
###Input example:
```in
forty
```
###Output example:
```out
five hundred and seventy-four
```
###Scale and convention of evaluation case
For 20% of the evaluation cases, 1 ≤ n ≤ 10.
For 50% of the evaluation cases, 1 ≤ n ≤ 100.
For 80% of the evaluation cases, 1 ≤ n ≤ 1000.
For all evaluation cases, 1 ≤ n ≤ 10000< br>
answer:If there is no answer, please comment
###Input format:
The input line contains an integer n.
###Output format:
Output a line containing an integer that represents the sum of the numbers that satisfy the condition.
###Input example:
```in
forty
```
###Output example:
```out
five hundred and seventy-four
```
###Scale and convention of evaluation case
For 20% of the evaluation cases, 1 ≤ n ≤ 10.
For 50% of the evaluation cases, 1 ≤ n ≤ 100.
For 80% of the evaluation cases, 1 ≤ n ≤ 1000.
For all evaluation cases, 1 ≤ n ≤ 10000< br>
answer:If there is no answer, please comment