n=int(input())+1 C=[p:=1]*n while~p+n: i=p=p+1 while 3>C[p]i:C[i]+=5**(i/p%p<1);i+=p print(C.count(5))