#include <iostream>
#include <string>
using namespace std;

int main() {
    string S;
    cin >> S;
    S.back() ^= 1;
    cout << S << endl;
}