#include<bits/stdc++.h> using namespace std; int main() { string s=""; cin>>s; reverse(s.begin(),s.end()); while(s.size()&&s[0]=='0') s.erase(0,1); cout<<s<<endl; return 0; }