#include using namespace std; int l,k,ans; int main(){ cin>>l>>k; while(l>k*2){l-=k*2; ans+=k;} cout<