n, k = [int(x) for x in input().split()] sie = [0] * (n + 1) for num in (2, 3): for i in range(num, n + 1, num): sie[i] += 1 for num in range(6, n + 1, 6): for snum in (num - 1, num + 1): if sie[snum] != 0: continue for i in range(snum, n + 1, snum): sie[i] += 1 res = 0 for c in sie: if c >= k: res += 1 print(res)