k_total = 0 count = 0 L, K = map(int, input().split()) while L > k_total: k_total += 2 * K count += 1 print((count - 1) * K)