def main(): L, K = list(map(int, input().split())) length_yu_eat = 0 while True: L -= K*2 if L <= 0: break else: length_yu_eat += K print(length_yu_eat) main()