#include <bits/stdc++.h>
using namespace std;
long long n;
int main() {
  cin >> n;
  long long ans;
  if (n % 2 == 1)
    ans = 1 + (n - 1) / 2;
  else
    ans = n / 2 + 1;
  cout << ans << endl;
  return 0;
}
