//Check whether M is an exact multiple of N, without using loops.
#include<stdio.h>int main(){ int M,N; scanf("%d %d",&M,&N); if(M%N==0) printf("%d",(M/N)/2); else printf("0"); return 0;}