#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin>>n;
if(n>0){
m=n+1;
}if(n==0){
m=0;
}if(n<0){
m=n-1;
}
cout<<m;
}
/**************************************************************
Problem: 1038
User: sucongyi
Language: C++
Result: Accepted
Time:12 ms
Memory:2072 kb
****************************************************************/