L, K = map(int, input().split()) restL = 0 restL = L // (2 * K) print(restL * K)