#include <bits/stdc++.h>
int main() {
  long long N;
  std::cin >> N;
  std::vector<long long> S(N);
  long long count = 0;
  for (int i = 0; i < N; ++i) {
    if (S[i] == i + 1) {
      if (S[i] == N)
        std::swap(S[i], S[i - 1]);
      else
        std::swap(S[i], S[i + 1]);
    }
    ++count;
  }
  std::cout << count << std::endl;
}
