#include <bits/stdc++.h>
#define pb push_back
#define ll long long
using namespace std;

const int N = 50 + 7;
const ll inf = 1e18;
const ll mod = 1e9 + 7;

string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);


    cin >> s;
    for (int i = s.size() - 1; i >= 0; i--) {
        if (s[s.size() - 1] == '0' && i == s.size() - 1) continue;
        cout << s[i];
    }
}