import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.math; // math functions void main() { auto rd = readln.split.to!(int[]), n = rd[0], k = rd[1]; auto sieve = new int[](n + 1); foreach (p; iota(2, n.to!real.sqrt.to!int + 2)) if (sieve[p] == 0) foreach (q; iota(p, n + 1, p)) ++sieve[q]; writeln(sieve.count!(a => a >= k)); }