1n = int(input())2if n >= 0:3 print(n)4else:5 n = -n6 a = n // 107 b = (n // 100) * 10 + n % 108 print(max(-a, -b))9 10