#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
getline(cin,s); //輸入一整個字串
reverse(s.begin(),s.end()); //翻轉
if(s.find_first_not_of('0')==string::npos){ //如果S是全零字符串,就返回string::npos
cout<<"0"<<endl;
}else{
s.erase(0, s.find_first_not_of('0'));//否則,就將前面的0清除
cout<<s<<endl;
}
return 0;
}