#include using namespace std; int main(){ string S; cin >> S; S.back() ^= '0' ^ '1'; cout << S << endl; }