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