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