package main import ( "fmt" ) func main() { var N, M int fmt.Scan(&N, &M) fmt.Println(N / M / 1000 * 1000) }