#include<bits/stdc++.h>
using namespace std;
string a,b;
int main() {
cin>>a;
int j=0;
if(a[0]=='-'){
for(int i=a.size()-1;i>=1;i--,j++) {
b=b+a[i];
}
if(b[0]=='0') {
b.erase(0,b.find_first_not_of('0'));
}
cout<<'-'<<b<<endl;
}
else{
for(int i=a.size()-1;i>=1;i--,j++) {
b=b+a[i];
}
if(b[0]=='0') {
b.erase(0,b.find_first_not_of('0'));
}
cout<<b<<endl;
}
return 0;
}