#include bool isNotPrime[2000001]; int minFactor[2000001], factor_n[2000001]; int main(){ for(int i=2;i<=2000000;i+=2){ isNotPrime[i] = true; minFactor[i] = 2; } minFactor[2] = 2; for(int i=3;i<=2000000;i+=2){ if(!isNotPrime[i]){ minFactor[i] = i; for(int j=2*i;j<=2000000;j+=i){ isNotPrime[j] = true; minFactor[j] = i; } } } for(int i=2;i<=2000000;i++){ if(!isNotPrime[i]){ factor_n[i] = 1; }else{ factor_n[i] = factor_n[i/minFactor[i]] + (i/minFactor[i]%minFactor[i] != 0); } } int N, K; scanf("%lld %d", &N, &K); int res = 0; for(int i=2;i<=N;i++){ res += factor_n[i] >= K; } printf("%d\n", res); }