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