#include<bits/stdc++.h>
using namespace std;
int main(){
int n,y,max;
scanf("%d",&n);
y=n/10+n%10*10;
max=n;
if (max<y){
max=y;
printf("%d\n",max);
}
else{
printf("%d\n",max);
}
return 0;
}
/**************************************************************
Problem: 1625
User: xiaojingxuan
Language: C++
Result: Accepted
Time:8 ms
Memory:2072 kb
****************************************************************/