pocky, mm = map(int, input().split()) turn = pocky // (mm*2) print(turn*mm)