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