import std.stdio; void main() { long n, m; readf("%s\n%s\n", &n, &m); writeln((n/1000/m)*1000); }