#include #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; const int INF = 1 << 30; const ll LLINF = 1LL << 60; int mod = 1000000007; int main(void){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; if(N&1) cout << 1 << endl; else cout << N/2+1 << endl; return 0; }