#include<bits/stdc++.h>
using namespace std;
int main(){
int x,h;
cin>>x;
if(x%2==1){
h=x/2+1;
}else{
h=x+1;
}
cout<<h;
return 0;
}
/**************************************************************
Problem: 1558
User: tangkaixuan
Language: C++
Result: Accepted
Time:42 ms
Memory:2072 kb
****************************************************************/