N=int(input()) x=150000 L=390 Primelist=[i for i in range(x+1)] Primelist[1]=0 # 1は素数でないので0にする. for i in Primelist: if i>L: break if i==0: continue for j in range(2*i,x+1,i): Primelist[j]=0 Primes=[Primelist[j] for j in range(x+1) if Primelist[j]!=0] USE=[0]*(N+1) L=len(Primes) for i in range(L): x=Primes[i] if x>N: break for j in range(i+1,L): y=x*Primes[j] if y>N: break for k in range(j+1,L): z=y*Primes[k] if z>N: break for l in range(k+1,L): w=z*Primes[l] if w>N: break USE[w]=1 print(sum(USE))