#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,h;
cin>>n;
a=n%10*10;
b=n/10;
h=a+b;
if(n>h) cout<<n;
else cout<<h;
return 0;
}
/**************************************************************
Problem: 1734
User: linmiaoling
Language: C++
Result: Accepted
Time:10 ms
Memory:2072 kb
****************************************************************/