#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int n,ans; int main() { while(~scanf("%d",&n)){ ans=0; if(n%2!=0)ans=0; else ans=(n/2-1)/2; printf("%d ",ans); } return 0; }