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