package main import ( "fmt" ) func main() { var L, K int fmt.Scan(&L, &K) Y := L / (2 * K) if L%(2*K) == 0 { Y-- } fmt.Println(Y * K) }