import java.util.*; public class Exercise137{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int count = 0; for(int i = 2; i < n + 1; i++){ int x = i; int pCount = 0; int lastNum = 2; if(x % 2 == 0){ pCount++; } while(x % 2 == 0){ x /= 2; } for(int j = 3; j * j <= x; j += 2){ if(x % j == 0){ pCount++; } while(x % j == 0){ x /= j; } lastNum = j; } if(x > lastNum){ pCount++; } if(pCount >= k){ count++; } } System.out.println(count); } }