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