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