#include using namespace std; static inline const string& solve(string& S) { if (S.back() == '0') S.back() = '1'; else S.back() = '0'; return S; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string S; S.reserve(8); cin >> S; cout << solve(S) << '\n'; return 0; }