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