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