#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, l, s, max;
  cin >> n;
  l = n / 10;
  s = (n / 100) * 10 + (n % 10);
  max = n;
  if (l > n) max = l;
  if (s > max) max = s;
  cout << max;
  return 0;
}
