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