# 2019/12/28 l,k=map(int,input().split()) yu=0 rem=l while rem>k*2: yu+=k rem-=k*2 print(yu)