length, kajiru = map(int, input().split()) kaisuu = 0 while kajiru*2 < length: kaisuu += 1 length -= kajiru*2 print(kajiru * kaisuu)