package main import . "fmt" func main() { var a,b,c int Scan(&a,&b) if a%b==0 { if a%2==0 { c=a/2/b*b-b } else { c=a/2/b*b } } else { c=a/2/b*b } Println(c) }