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