#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
string s;
int main()
{
cin >> s;
bool a = false;
if(s[0] == '-') s.erase(0, 1), a = true;
reverse(s.begin(), s.end());
while(s[0] == '0')
{
s.erase(0, 1);
}
if(a) cout << "-";
cout << s;
return 0;
}