/**                                                                   
 *            .,,       .,:;;iiiiiiiii;;:,,.     .,,                  
 *          rGB##HS,.;iirrrrriiiiiiiiiirrrrri;,s&##MAS,               
 *         r5s;:r3AH5iiiii;;;;;;;;;;;;;;;;iiirXHGSsiih1,              
 *            .;i;;s91;;;;;;::::::::::::;;;;iS5;;;ii:                 
 *          :rsriii;;r::::::::::::::::::::::;;,;;iiirsi,              
 *       .,iri;;::::;;;;;;::,,,,,,,,,,,,,..,,;;;;;;;;iiri,,.          
 *    ,9BM&,            .,:;;:,,,,,,,,,,,hXA8:            ..,,,.      
 *   ,;&@@#r:;;;;;::::,,.   ,r,,,,,,,,,,iA@@@s,,:::;;;::,,.   .;.     
 *    :ih1iii;;;;;::::;;;;;;;:,,,,,,,,,,;i55r;;;;;;;;;iiirrrr,..      
 *   .ir;;iiiiiiiiii;;;;::::::,,,,,,,:::::,,:;;;iiiiiiiiiiiiri        
 *   iriiiiiiiiiiiiiiii;;;::::::::::::::::;;;iiiiiiiiiiiiiiiir;       
 *  ,riii;;;;;;;;;;;;;:::::::::::::::::::::::;;;;;;;;;;;;;;iiir.      
 *  iri;;;::::,,,,,,,,,,:::::::::::::::::::::::::,::,,::::;;iir:      
 * .rii;;::::,,,,,,,,,,,,:::::::::::::::::,,,,,,,,,,,,,::::;;iri      
 * ,rii;;;::,,,,,,,,,,,,,:::::::::::,:::::,,,,,,,,,,,,,:::;;;iir.     
 * ,rii;;i::,,,,,,,,,,,,,:::::::::::::::::,,,,,,,,,,,,,,::i;;iir.     
 * ,rii;;r::,,,,,,,,,,,,,:,:::::,:,:::::::,,,,,,,,,,,,,::;r;;iir.     
 * .rii;;rr,:,,,,,,,,,,,,,,:::::::::::::::,,,,,,,,,,,,,:,si;;iri      
 *  ;rii;:1i,,,,,,,,,,,,,,,,,,:::::::::,,,,,,,,,,,,,,,:,ss:;iir:      
 *  .rii;;;5r,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,sh:;;iri       
 *   ;rii;:;51,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.:hh:;;iir,       
 *    irii;::hSr,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,sSs:;;iir:        
 *     irii;;:iSSs:.,,,,,,,,,,,,,,,,,,,,,,,,,,,..:135;:;;iir:         
 *      ;rii;;:,r535r:...,,,,,,,,,,,,,,,,,,..,;sS35i,;;iirr:          
 *       :rrii;;:,;1S3Shs;:,............,:is533Ss:,;;;iiri,           
 *        .;rrii;;;:,;rhS393S55hh11hh5S3393Shr:,:;;;iirr:             
 *          .;rriii;;;::,:;is1h555555h1si;:,::;;;iirri:.              
 *            .:irrrii;;;;;:::,,,,,,,,:::;;;;iiirrr;,                 
 *               .:irrrriiiiii;;;;;;;;iiiiiirrrr;,.                   
 *                  .,:;iirrrrrrrrrrrrrrrrri;:.                       
 *                        ..,:::;;;;:::,,.                            
 */
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int n,ans;
void find(int k)
{
	int c=0;
	for(int i=1;i<=sqrt(k);i++)
	{
		if(k%i==0)
		{
			c++;
		}
	}
	c*=2;
	if(c==8)
	{
		ans++;
	}
	return;
}
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		if(i%2!=0)
		{
			find(i);		
		}
	}
	printf("%d\n",ans);
	return 0;
}
/**                                                                         
 *          .,:,,,                                        .::,,,::.         
 *        .::::,,;;,                                  .,;;:,,....:i:        
 *        :i,.::::,;i:.      ....,,:::::::::,....   .;i:,.  ......;i.       
 *        :;..:::;::::i;,,:::;:,,,,,,,,,,..,.,,:::iri:. .,:irsr:,.;i.       
 *        ;;..,::::;;;;ri,,,.                    ..,,:;s1s1ssrr;,.;r,       
 *        :;. ,::;ii;:,     . ...................     .;iirri;;;,,;i,       
 *        ,i. .;ri:.   ... ............................  .,,:;:,,,;i:       
 *        :s,.;r:... ....................................... .::;::s;       
 *        ,1r::. .............,,,.,,:,,........................,;iir;       
 *        ,s;...........     ..::.,;:,,.          ...............,;1s       
 *       :i,..,.              .,:,,::,.          .......... .......;1,      
 *      ir,....:rrssr;:,       ,,.,::.     .r5S9989398G95hr;. ....,.:s,     
 *     ;r,..,s9855513XHAG3i   .,,,,,,,.  ,S931,.,,.;s;s&BHHA8s.,..,..:r:    
 *    :r;..rGGh,  :SAG;;G@BS:.,,,,,,,,,.r83:      hHH1sXMBHHHM3..,,,,.ir.   
 *   ,si,.1GS,   sBMAAX&MBMB5,,,,,,:,,.:&8       3@HXHBMBHBBH#X,.,,,,,,rr   
 *   ;1:,,SH:   .A@&&B#&8H#BS,,,,,,,,,.,5XS,     3@MHABM&59M#As..,,,,:,is,  
 *  .rr,,,;9&1   hBHHBB&8AMGr,,,,,,,,,,,:h&&9s;   r9&BMHBHMB9:  . .,,,,;ri. 
 *  :1:....:5&XSi;r8BMBHHA9r:,......,,,,:ii19GG88899XHHH&GSr.      ...,:rs. 
 *  ;s.     .:sS8G8GG889hi.        ....,,:;:,.:irssrriii:,.        ...,,i1, 
 *  ;1,         ..,....,,isssi;,        .,,.                      ....,.i1, 
 *  ;h:               i9HHBMBBHAX9:         .                     ...,,,rs, 
 *  ,1i..            :A#MBBBBMHB##s                             ....,,,;si. 
 *  .r1,..        ,..;3BMBBBHBB#Bh.     ..                    ....,,,,,i1;  
 *   :h;..       .,..;,1XBMMMMBXs,.,, .. :: ,.               ....,,,,,,ss.  
 *    ih: ..    .;;;, ;;:s58A3i,..    ,. ,.:,,.             ...,,,,,:,s1,   
 *    .s1,....   .,;sh,  ,iSAXs;.    ,.  ,,.i85            ...,,,,,,:i1;    
 *     .rh: ...     rXG9XBBM#M#MHAX3hss13&&HHXr         .....,,,,,,,ih;     
 *      .s5: .....    i598X&&A&AAAAAA&XG851r:       ........,,,,:,,sh;      
 *      . ihr, ...  .         ..                    ........,,,,,;11:.      
 *         ,s1i. ...  ..,,,..,,,.,,.,,.,..       ........,,.,,.;s5i.        
 *          .:s1r,......................       ..............;shs,          
 *          . .:shr:.  ....                 ..............,ishs.            
 *              .,issr;,... ...........................,is1s;.              
 *                 .,is1si;:,....................,:;ir1sr;,                 
 *                    ..:isssssrrii;::::::;;iirsssssr;:..                   
 *                         .,::iiirsssssssssrri;;:.                     
 */

Measured memory_bytes: 256