#include using namespace std; int main(void){ string s; cin >> s; int last = s.size()-1; s[last] == '0' ? s[last] = '1' : s[last] = '0'; cout << s << endl; }