#include #include using namespace std; using ll = long long; using mint = atcoder::modint998244353; using maxt = atcoder::modint1000000007; int main() { int N; cin >> N; N /= 2; if(N % 2 == 1) { cout << N + 1 << endl; } else { cout << N << endl; } }