#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); string S; cin >> S; if (S.back() == '0') S.back() = '1'; else S.back() = '0'; cout << S << '\n'; }