#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) {
  long long x = (a / gcd(a, b)) * b;
  return x;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t, n, x, y, k, z, m, a, b, c;
  string s;
  cin >> s;
  m = s.length();
  long long zer = 0;
  long long pos = 0, mx = 0;
  if (s[0] != '-') {
    cout << s << '\n';
  } else {
    for (long long i = 1; i < s.length(); i++) {
      a = s[i] - 48;
      if (a > mx) {
        mx = a;
        pos = i;
      }
      if (a == 0) zer++;
    }
    if (zer == (m - 2) && m <= 3)
      z++;
    else
      cout << "-";
    b = s[m - 1] - 48;
    c = s[m - 2] - 48;
    if (b > c)
      pos = m - 1;
    else
      pos = m - 2;
    for (long long i = 1; i < m; i++) {
      if (i == pos) continue;
      cout << s[i];
    }
    cout << '\n';
  }
  return 0;
}
