#abc235a. [abc235_a]Rotate
[abc235_a]Rotate
Problem Statement
Let denote the -digit integer whose digits are , , from left to right.
Given a -digit integer none of whose digits is , find .
Constraints
- is a -digit integer none of whose digits is .
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
123
Sample Output 1
666
We have .
Sample Input 2
999
Sample Output 2
2997
We have .