import sequtils proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': break result = 10 * result + k.ord - '0'.ord let n = scan() let k = scan() var F : array[20000010,int] for i in 2..n: # .float.sqrt.int if F[i] > 0: continue for j in countup(i*2,n,i): F[j] += 1 F[i] = 1 var ans = 0 for f in F: if f >= k : ans += 1 echo ans