#include #include using namespace std; int main(){ int a,b;scanf("%d%d",&a,&b); int c=a%(b*2); if(c==0)c+=b*2; printf("%d\n",(a-c)/2); }