#include using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); string S; cin >> S; S.back() = (S.back() == '0' ? '1' : '0'); cout << S << endl; return 0; }