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