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