#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, a1, a2, a3, a4, d;
  long int x = 0, y = 0;
  cin >> n;
  if (n <= 0) {
    a1 = n / 10;
    a2 = (n / 100) * 10 + n % 10;
    d = max(a1, a2);
    cout << d;
  } else {
    cout << n;
  }
}
