#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int n;
  cin >> n;
  int deleteLast = n / 10;
  int deleteBeforeTheLast = (n / 100 * 10) + n % 10;
  cout << max(n, max(deleteBeforeTheLast, deleteLast));
  return 0;
}
