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