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.
The single line contains integer *n* (10 ≤ |*n*| ≤ 10<sup class="upper-index">9</sup>) — the state of Ilya's bank account.
import math
import heapq
import sys


m = int(1e9 + 7)
k = int(2e5+1)
fact = [0,1]
for i in range(2,k):
    fact.append((fact[i-1]*i)%m)

def mul(x, y, p):
    return (x * y) % p

def add(x, y, p):
    return (x + y) % p

def input_arr():
    arr = [int(x) for x in input_string().split()]
    return arr

def input_n():
    n = int(input_string())
    return n

def sub_list(a,b):
    c = []
    for i in range(len(a)):
        c.append(a[i]-b[i])
    return c

def sub_const(a, c):
    b = []
    for x in a:
        b.append(x-c)
    return b

def binary_search(arr, low, high, x):
    if high >= low:
        mid = (high + low) // 2
        if arr[mid] == x:
            return mid
        elif arr[mid] >= x:
            return binary_search(arr, low, mid - 1, x)
        else:
            return binary_search(arr, mid + 1, high, x)
    else:
        return -1
    
def printlist(a):
    for x in a:
        print(x, end = " ")

def input_string():
    global mode
    if mode==0:
        return input()
    else:
        with open('/Users/aryan/Desktop/cp/test_case.txt') as f:
            lines = f.readlines()
        global line 
        st = lines[line][:-1]
        line+=1
        return st
    
def is_prime(n):
    for i in range(2, int(math.sqrt(n)+1)):
        if n%i==0:
            return False
    return True

def pow_modp(x, y, p):
    if y<0:
        return 1
    res = 1
    x%=p
    while (y > 0):
        if ((y & 1) != 0):
            res = ((res%p) * (x%p))%p
        y = y >> 1  # y = y/2
        x = (x%p * x%p)%p  # Change x to x^2
    return res % p

def inv(x):
    return pow_modp(x,m-2,m)

def ncr_modp(n, r, p):
    if n<=0 or r<=0 or (n-r)<=0:
        return 1
    return fact[n]*((inv(fact[r])*inv(fact[n-r]))%p)%p

def ncr(n, r):
    return math.comb(n, r)

def binary(n):
    return format(n, 'b')

def solve():
    n = input_n()
    if n>=0:
        print(n)
    else:
        k = -n
        k1 = k%10
        k2 = (k%100)//10
        if k2>=k1:
            print(-(k//10) + k1)
        else:
            print(-(k//10) + k2)


def solve_t():
    t = input_n()
    
    for l in range(t):
        n = input_n()
        arr = input_arr()
        arr.sort()
        s = 0
        for i in range(n):
            if arr[i]<=i+1:
                # k1 = math.pow(2, n-1-i)%m
                k1 = pow_modp(2, n-1-i, m)
                # k2 = math.comb(i, arr[i]-1)%m
                k2 = ncr_modp(i, arr[i]-1)
                s = (s+(k1*k2)%m)%m
        print(int(s))

        

line = 0 
mode = 0
if len(sys.argv)>1 and sys.argv[1]=='file':
    mode = 1
solve()
