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