#C6351. Maximum Integer After Deleting One Character

    ID: 50102 Type: Default 1000ms 256MiB

Maximum Integer After Deleting One Character

Maximum Integer After Deleting One Character

You are given a string s representing a non-negative integer. Your task is to remove exactly one character (digit) from the string so that the resulting string, when interpreted as an integer, is maximized.

If the input string consists of only a single digit, then the answer is the string itself.

Note: When computing the result, treat the resulting string as a number. Removing a digit may lead to a number with leading zeros; these should be interpreted according to their numerical value.

Example:

  • Input: "1234" – possible outcomes: "234", "134", "124", "123". The maximum value is 234, so the output is "234".
  • Input: "1001" – outcomes: "001" (interpreted as 1), "101", "101", "100". The maximum is "101".

inputFormat

The input consists of a single line containing the string s which represents a non-negative integer. The string will contain only digits and have a length of at least 1.

outputFormat

Output a single line containing the maximum possible integer (in string form) obtained by removing exactly one character from s.

## sample
1234
234