#include <iostream>
using namespace std;

int main() {
    int x;
    cin >> x;
    int y;
    if (x > 0) {
        y = x + 1;
    } else if (x == 0) {
        y = 0;
    } else {
        y = x - 1;
    }
    cout << y << endl;
    return 0;
}    
/**************************************************************
	Problem: 1038
	User: linzihang
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/