package main import "fmt" func main() { var L, K int fmt.Scan(&L, &K) fmt.Println(((L - 1) / (2 * K)) * K) }