#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)(1e5) + 100;
const int INF = (1 << 30);
const double PI = acos(-1.0);
const double EPS = (1e-6);
int main() {
  int a, b, n;
  cin >> n;
  a = n / 10;
  b = n / 100 * 10 + n % 10;
  cout << max(max(a, b), n);
  return 0;
}
