#include <bits/stdc++.h>
using namespace std;
int main(){
    long long k;
    cin>>k;
    string floor=to_string(k);
    string mirror="";
    for (int i=floor.length()-1;i>=0;i--) {
        if (floor[i]=='0') {
            mirror+='0';
        } else {
            mirror+=floor[i];
        }
    }
    cout<<stoi(mirror)<<endl;
    return 0;
}
