#abc146c. [abc146_c]Buy an Integer
[abc146_c]Buy an Integer
Problem Statement
Takahashi has come to an integer shop to buy an integer.
The shop sells the integers from through . The integer is sold for yen (the currency of Japan), where is the number of digits in the decimal notation of .
Find the largest integer that Takahashi can buy when he has yen. If no integer can be bought, print .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the greatest integer that Takahashi can buy. If no integer can be bought, print .
Sample Input 1
10 7 100
Sample Output 1
9
The integer is sold for yen, and this is the greatest integer that can be bought. Some of the other integers are sold for the following prices:
- yen
- yen
- yen
Sample Input 2
2 1 100000000000
Sample Output 2
1000000000
He can buy the largest integer that is sold. Note that input may not fit into a -bit integer type.
Sample Input 3
1000000000 1000000000 100
Sample Output 3
0
Sample Input 4
1234 56789 314159265
Sample Output 4
254309