#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string S; if (!(cin >> S)) return 0; S.back() = (S.back() == '0') ? '1' : '0'; cout << S << '\n'; return 0; }