Allergenic to Three
Time Limit: 1 sec
The Problem
Audry loves to play with numbers. 7 is her favorite digit. But she is allergenic to 3. She doesn’t like the number that contains the digit 3.
Audry is weak in programming as she is only 6 years old . Now you write a program which will find the numbers from 1 to N that do not contain the digit 3.
The Input
There are several lines of input. Each line contains a digit N (0<N<=10000). Input is terminated by EOF.
The Output
For each line of input you have to print the total of numbers from 1 to N that does not contain the digit 3 in a separate line.
Sample Input
10
45
Sample Output
9
31
[School & College Level]
Inter School & College Programming Contest (ISCPC) 2017
Problem Setter: Parag Paul