m,c=int(input()),0 for n in range(m+1): i,*l=2, while i*i<=n: if n%i:i+=1 else:n//=i;l+=[i] c+=len(l:=l+[n])==len({*l})==4 print(c)