l = map(int, raw_input().split(' ')) L = l[0] K = l[1] count = 0 while L > 2 * K: count += 1 L -= 2 * K print(str(K * count))