You are given an integer that is represented in the form of string of length . You can remove at most 1 digit from the number after removing the rest of the digits that are arranged in the same order.
Example
For , if you delete the digit , the new number is .
You are also given an integer . Find the maximum possible value of ( mod ) after deleting at most 1 digit from number .
Input format
Output format
For each test case, print the maximum possible value of the mod function in a new line.
Constraints
If we remove the last digit from the number , then the new number will be .