L, K = map(int, input().split()) q = 0 for n in range(L): L = L - (K * 2) if L <= 0: break else: q += K print(q)