import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; void main() { auto N = readln.strip.to!long; auto M = readln.strip.to!int; (N / M / 1000 * 1000).writeln; }