let N = stdin.ReadLine() |> bigint.Parse let M = stdin.ReadLine() |> bigint.Parse let s = N / M let s2 = s - (s % 1000I) printfn "%A" s2