#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x = n / 10;
  int y = n % 10;
  int z = x - x % 10 + y;
  if (n > 0) {
    cout << n;
  }
  if (n < 0) {
    int r = z > x ? z : x;
    cout << r;
  }
  return 0;
}
