#include using namespace std; int main() { string S; cin >> S; int k=S.size()-1; if(S[k]=='1'){ S[k]='0'; } else{ S[k]='1'; } cout << S << endl; }