Codeforces Round 186 (Div. 2)
A
Ilya and Bank Account
Codeforces
900
原题
←B →
翻译中…

Ilya is a very clever lion, he lives in an unusual city ZooVille. In this city all the animals have their rights and obligations. Moreover, they even have their own bank accounts. The state of a bank account is an integer. The state of a bank account can be a negative number. This means that the owner of the account owes the bank money.

翻译中…

Ilya the Lion has recently had a birthday, so he got a lot of gifts. One of them (the gift of the main ZooVille bank) is the opportunity to delete the last digit or the digit before last from the state of his bank account no more than once. For example, if the state of Ilya's bank account is -123, then Ilya can delete the last digit and get his account balance equal to -12, also he can remove its digit before last and get the account balance equal to -13. Of course, Ilya is permitted not to use the opportunity to delete a digit from the balance.

翻译中…

Ilya is not very good at math, and that's why he asks you to help him maximize his bank account. Find the maximum state of the bank account that can be obtained using the bank's gift.

翻译中…

Input

翻译中…

The single line contains integer $*n*$ $(10 ≤ |*n*| ≤ 10^{9})$ — the state of Ilya's bank account.

翻译中…

Output

翻译中…

In a single line print an integer — the maximum state of the bank account that Ilya can get.

翻译中…

Note

翻译中…

In the first test sample Ilya doesn't profit from using the present.

翻译中…

In the second test sample you can delete digit 1 and get the state of the account equal to 0.

翻译中…

样例

Input #1
2230
Output #1
2230
InputCopy OutputCopy
Input #2
-10
Output #2
0
InputCopy OutputCopy
Input #3
-100003
Output #3
-10000
InputCopy OutputCopy
题目信息
题号
313A
时间限制
2 s
内存限制
256 MB
标签
模拟
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。