#include <iostream> using namespace std; int main() { int c; cin >> c; c = ~c & (c + 1); cout << c; return 0; }