#include using namespace std; using ll = long long; int main(){ ll N; cin >> N; if (N % 2 == 1) cout << 1 << endl; else cout << (N+1)/2+1 << endl; return 0; }