L,K = map(int,input().split()) eat = 0 k=K*2 while True: L-=k if L <= 0: break eat+=K print(eat)